problem in uderstanding some basic concepts

Hello! I’m just getting start with OpenGL, I read some articles about OpenGL on the website, but still have some questions. I hope you can help me to figure out.

  1. What determines my OpenGL version? Is it that OpenGL functions come with Graphics card drivers ?
    Can I change my OpenGL version by just doing something like installing some drivers on my computer ?

  2. Why do I have to call *GetProcAddress to get the address of functions of extensions, where are the functions’ binaries? Is GLEW simply a function loader ? How dose it load functions for me ?

  3. I read the article about creating a OpenGL context, and feel a little confused about the Proper Context Creation. I’m not sure about what the advantages are of using WGL extension functions to create a context. Is it because functions like wglCreateContextAttribsARB supports extensible attributes for an OpenGL context ?
    Where can I get detailed descriptions about those attributes ?

[QUOTE=Silent lamb;1245029]1. What determines my OpenGL version? Is it that OpenGL functions come with Graphics card drivers ?
Can I change my OpenGL version by just doing something like installing some drivers on my computer ?[/QUOTE]
Yes, OpenGL functionality is embedded into graphics card driver. You can change OpenGL version by installing different versions of drivers, but it is also limited with the hardware capabilities. For example, you cannot use OpenGL 4.0 functionality if your hardware does not support it.

It is an excellent mechanism that has been working for two decades. As already said in the previous answer, the functions are built in drivers.
Yes, GLEW is simply an extension loader/wrapper. It is an open source solution, so you can check by yourself how it is implemented.

I’m not sure what is the meaning of “Proper Context Creation”. There is no advantage of using extensions to make a context; you simply DON’T HAVE an alternative for making GL 3+ context. By using wglCreateContext() only a GL 2.1 context can be made. But it is necessary in order to call wglCreateContextAttribsARB(). Details about context creation and appropriate attributes can be found here.

Thank you very much for the explanations

[QUOTE=Aleksandar;1245043]
I’m not sure what is the meaning of “Proper Context Creation”. There is no advantage of using extensions to make a context; you simply DON’T HAVE an alternative for making GL 3+ context. By using wglCreateContext() only a GL 2.1 context can be made. But it is necessary in order to call wglCreateContextAttribsARB(). Details about context creation and appropriate attributes can be found here.[/QUOTE]

I was told about Proper Context Creation in the tutorial Creating an OpenGL Context, which suggest that I should first call ChoosePixelFormat, SetPixelFormat and wglCreateContext to ceate a false context, so that we can get functions(like wglChoosePixelFormatARB and wglCreateContextAttribsARB) we needed to create a proper context. So I guess the “Proper Context Creation” is creating a GL 3+ context like what you said.

Yes, that is correct. In order to get function pointers to the new functions, you need to have a GL context. There is no choice but to create an old style context first.
The same idea applies for creating a GL3 context and also a multisampled surface.

You can also search for tutorials on the Wiki
This is one example
http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)

Thank you very much for your explanation!

[QUOTE=Aleksandar;1245043]
I’m not sure what is the meaning of “Proper Context Creation”. There is no advantage of using extensions to make a context; you simply DON’T HAVE an alternative for making GL 3+ context. By using wglCreateContext() only a GL 2.1 context can be made. But it is necessary in order to call wglCreateContextAttribsARB(). Details about context creation and appropriate attributes can be found here.[/QUOTE]

The “Proper Context Creation” is introduced in the tutorial Creating an OpenGL Context, now I see that “Proper Context” is GL 3+ context like you said.

You can create OpenGL 3+ contexts with wglCreateContext, you just can’t specify a minimum version or select a non-compatibility profile.