OpenGL initialization

Started by
0 comments, last by Laval B 13 years, 6 months ago
Hello everyone.

I want to initialize OpenGL with antialiasing on. If i understand correctly, i need to first create a window (of course) then create a dummy context using wglCreateContext. Once this is done, i can load the wglChoosePixelFormatARB extension to get the pixel type that will support antialiasing (with the color buffer depth, z-buffer depth and stencil if i need, etc).

After that, i destroy the dummy context as well as the window. Then, i create the window again and use SetPixelFormat to set the pixel type (with the value optained earlier). My question is this : if i now want to initialize OpenGL with version 3.2 core profile (for example) i will need to use wglCreateContextAttribARB which is itself and extension. So i need to create another dummy context with wglCreateContext before i can use wglCreateContextAttribARB. Do i need to destroy the window again or what ?

If i have to, i don't see how i can get done with it since i will always need a dummy context for opengl 3.0 and above. Do i need to destroy windows and contexts only because i use wglChoosePixelFormatARB ?
We think in generalities, but we live in details.
- Alfred North Whitehead
Advertisement
Never mind, it was a stupid question.
We think in generalities, but we live in details.
- Alfred North Whitehead

This topic is closed to new replies.

Advertisement