Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

jocke

OpenGL OpenGL 1.2 ???

This topic is 6107 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Where do i find OpenGL 1.2? I looked at www.opengl.org in the download section but i could not find it. Could anyone tell where i find it?

Share this post


Link to post
Share on other sites
Advertisement
Actually, i did use the search feature, and it didnt find
anything. Anyway , my problem is this:

I want to use the wglSwapIntervalEXT() function to turn off vsync
so i can test the TRUE fps of my app. To do this i was told
that i should go to opengl.org and get a file named "wglext.h"
which had the wglSwapIntervalEXT() function. So i got the file,
included it in my source file and called the function.
When i tryed to compile i got and "unresolved external symbol"
error message. So i thought that maybe i need a newer version of
opengl beacuse i only have 1.1.
So any hint on what i should do about this would be helpful.

Share this post


Link to post
Share on other sites
Ok, this question is kind of unique then . You pass the name of the function you want to wglGetProcAddress, and store the return value in a function pointer (look in the wglext.h header, I forget what the name of the typedef is). Then you call that function pointer as if it were wglSwapIntervalEXT (because it basically is).

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites
Ok, in wglext.h the following is defined:

extern BOOL WINAPI wglSwapIntervalEXT (int);
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);

And in my program i did this:
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)
wglGetProcAddress("wglSwapIntervalEXT");

When i compiled this i got this message:

error C2659: ''='' : overloaded function as left operand

What am i doing wrong?

NOTE:
I have declared my own function pointer, i just used the existing
one. Is that wrong?

Share this post


Link to post
Share on other sites
Yep Null and Void you are correct
The Joke, the problem with your code is that you declare wglSwapIntervalEXT as an extern function, so the linker searches for it in the .obj it is linking (static linking)
Opengl uses a dynamic link schema, this means that at compile time you do not know where is the function, the exact adress will be given at runtime.
Perhaps i''m not very clear, but this is the spirit of it

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!