A question about opengl version and texture mappin

I’m a comer here.
And also a greed hand in writting code with opengl.
So, may be the question seems silly, please do not laugh at me.

  1. If I want to use new features in opengl 4.1, how can I setup the enviroment ?
    According to the wiki for starter, it said that opengl ABI is frozen to version 1.x on Windows and linux. If you wanna using new features in version 2.0 or later, I need to call “glXGetProcAddress” to get the runtime func address.So, here comes the question, if i have not done that yet, are all of the ABIs of opengl depends on version 1.x ? It means, actually, I were using opengl 1.1 if I had not call “glXGetProcAddress” for any ABIs lick glBegin, glEnd?

  2. Is it necessary for me to call glXGetProcAddress to get all of the functions runtime address?

  3. If I want to use new features, I do not need any additional library or something else but get the TRUE FUNC address , do I?

  4. If I’m too lazy to get all of the runtime address, is there an easier way make me able to use new features in later version? And what’s the difference between GLES and GLEE?

  5. It was said that there was no necessary for texutre files’(like bmp, jpg) size keep in power of 2(like 2, 4, 8 ,16, 32…) anymore in later version. But I failed to show the texture with 192*90 pixels. And I spent more then one days on checking the problem, at last I found all of the questions listed here, the last one is: is it necessary for me to keep the texture in power of 2 when i’m using opengl 4.1?

I’m really confused and need help, wiki has given me some advices, but actually i’m not good at English, so I’m afraid of mis-understanding the WIKI. And this is the reason why I asked for help here and posted such many starter questions.

  1. The ABI is indeed GL 1.1 so if you need newer function pointers you have to get that at runtime with wglGetProcAdress (for windows. glX* is for linux). Note that with GL 4.1 the immediate mode glBegin glEnd etc are no more available.

  2. wglGetProcAdress under windows yes. Either done by you directly, either with an helper library such as GLEW

  3. you do not need any addition library, even if some could help :
    http://sites.google.com/site/opengltutorialsbyaks/introduction-to-opengl-4-1—tutorial-02
    Creating an OpenGL Context (WGL) - OpenGL Wiki

  4. I heard that lastest SDL + GLEW works.
    GL ES is OpenGL for Embedded Systems, nothing to do with our discussion here. GLEW seem more maintained than GLEE, but feel free to try both.

  5. If you hardware+drivers actually support GL 4.1, non-power-of-two textures should work. Try power-of-two to check if you had not another texturing problem unrelated to tex size (incomplete mipmaps, etc)

By the way, what says glGetString(GL_VERSION) inside your GL code ?
What is your video card, driver version, OS version ?

As you are interested in learning modern OpenGL without deprecated features, this tutorial series is great :
http://www.arcsynthesis.org/gltut/

glGetString returns “1.4.0 - Build 7.14.10.4957”
os is windows xp + sp3
and my video card is gt240.
I think my video card should supported GL 4.1 with newest driver i download from nvidia’s official website.

And very thanks for your information, I think I’ve already got the correct key to the door infront of me.

Best regards.

glGetString returns “1.4.0 - Build 7.14.10.4957”

Getting an OpenGL version less than 2.0 from any graphics card in recent memory is a sure sign that you’re getting the Microsoft driver, not the actual graphics driver. Odds are, something’s wrong in your pixel format setup code.

and my video card is gt240.
I think my video card should supported GL 4.1 with newest driver i download from nvidia’s official website.

No. A GT240 supports up to OpenGL 3.x, the equivalent of Direct3D 10. OpenGL 4.x is the equivalent of Direct3D 11, which requires an HD5xxx or better, or a GT4xx or better.

Normally on Windows you’d get version 1.1, and a GL_VENDOR of something like “Microsoft Corporation”, GL_RENDERER of “Microsoft Generic” or similar. The important things is that it’s 1.1 and will have “Microsoft” all over the vendor and renderer strings.

None of which detracts from the fact that something is badly wrong with your installation.

Is your PC one of those which also has an integrated 3D card? “1.4.0 - Build 7.14.10.4957” positively screams “Intel” at me - a quick Google for “7.14.10.4957” in fact reveals that it actually is Intel.

Yes, it does sound like you have a intel video board. Perhaps you need to plug your cable to your nvidia or perhaps your setup is weird (dual screen?)
You need GL 2.0 for non power of two textures to work.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.