OpenGL 1.2 ???
Started by jocke, Oct 29 2001 09:18 PM
14 replies to this topic
Sponsor:
#2 Moderators - Reputation: 1087
Posted 29 October 2001 - 09:42 PM
Does anyone use the search feature? OpenGL 1.2+ is NOT supported under Windows. HOWEVER your video card manufacturer can support it in their drivers. HOWEVER since Windows doesn''t support it you have to use extensions to get the 1.2+ functions.
[Resist Windows XP''s Invasive Production Activation Technology!]
[Resist Windows XP''s Invasive Production Activation Technology!]
#3 Members - Reputation: 122
Posted 29 October 2001 - 09:59 PM
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.
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.
#4 Moderators - Reputation: 1087
Posted 29 October 2001 - 10:19 PM
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!]
[Resist Windows XP''s Invasive Production Activation Technology!]
#5 Members - Reputation: 122
Posted 29 October 2001 - 10:26 PM
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?
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?
#7 Moderators - Reputation: 1087
Posted 29 October 2001 - 10:29 PM
I think it goes:
I''m not looking at a reference or anything, but I still think that''s correct.
[Resist Windows XP''s Invasive Production Activation Technology!]
|
I''m not looking at a reference or anything, but I still think that''s correct.
[Resist Windows XP''s Invasive Production Activation Technology!]
#8 Members - Reputation: 122
Posted 29 October 2001 - 11:02 PM
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
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
#11 Moderators - Reputation: 1087
Posted 30 October 2001 - 09:59 AM
quote:
Original post by Zerosignull
1.2 is suported in win 2k. just ms wont update opengl32.dll
While I''m not saying you''re wrong, how is OpenGL 1.2 supported if the MCD doesn''t support it? I''m just curious
[Resist Windows XP''s Invasive Production Activation Technology!]
#13 Moderators - Reputation: 1087
Posted 30 October 2001 - 10:32 AM
An MCD is a mini client driver, in this case opengl32.dll. Also, I think I figured out why they say that. The .lib file doesn''t, but the Win2K .dll does. So, we still have to use extensions for 1.2+, but we can be sure that all of 1.2''s standard features are supported in software mode.
[Resist Windows XP''s Invasive Production Activation Technology!]
[Resist Windows XP''s Invasive Production Activation Technology!]
#14 Members - Reputation: 122
Posted 31 October 2001 - 02:22 AM
Ok, im a bit confused.
Is OpenGL 1.2 a new set of libs and headers?
I had heard somewhere that in order to use 1.2
i need to use extensions. Is this true?
If so, where do i find these extensions?
I mean there have to be some new dlls and libs and stuff right?
Is OpenGL 1.2 a new set of libs and headers?
I had heard somewhere that in order to use 1.2
i need to use extensions. Is this true?
If so, where do i find these extensions?
I mean there have to be some new dlls and libs and stuff right?
#15 Moderators - Reputation: 1087
Posted 31 October 2001 - 09:19 AM
quote:
Original post by jocke
Ok, im a bit confused.
Is OpenGL 1.2 a new set of libs and headers?
I had heard somewhere that in order to use 1.2
i need to use extensions. Is this true?
If so, where do i find these extensions?
I mean there have to be some new dlls and libs and stuff right?
You use wglGetProcAddress to get the extensions (if you''ve downloaded glext.h). Microsoft won''t give out an updated .lib file, so your program doesn''t know about the new functions ahead of time. Most other OS''s have updated files, so your program DOES know about the functions ahead of time.
[Resist Windows XP''s Invasive Production Activation Technology!]






