From: Karthik K. <akk...@ya...> - 2004-10-03 22:32:59
|
Hi, I am developing openGL applications in C, in MinGW environment. I had downloaded and installed the latest 'Current' versions of MinGW API. The w32api version is 3.1. C:\>gcc --version gcc (GCC) 3.4.2 (mingw-special) As per 'glGetString(GL_VERSION) ', it returns 1.4.0 implying my video card supports 1.4.0 . When I try to use the 1.4.0 API though, I could not get MinGW to compile them. So I wrote this small program to test my GL environment. #include <stdlib.h> // EXIT_SUCCESS #include <GL/gl.h> int main() { printf("OpenGL Version 1.1 " ); #ifndef GL_VERSION_1_1 printf(" NOT " ); #endif printf("supported. "); printf("\nOpenGL Version 1.2 " ); #ifndef GL_VERSION_1_2 printf(" NOT " ); #endif printf("supported. "); printf("\nOpenGL Version 1.3 " ); #ifndef GL_VERSION_1_3 printf(" NOT " ); #endif printf("supported. "); system("pause"); return EXIT_SUCCESS; } And this is what I get . " OpenGL Version 1.1 supported. OpenGL Version 1.2 NOT supported. OpenGL Version 1.3 NOT supported." It seems like the GL/gl.h headers distributed with MinGW supports only 1.1 . I checked if the device driver had installed any of them. I could see opengl32.dll in my system directory (in WinXP), but I could not see the headers though. It seems like the headers that are distributed with MinGW support only until 1.3. How could I get the headers to support the latest version of GL , that my card supports ? -- Karthik. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail |
From: Tor L. <tm...@ik...> - 2004-10-03 23:24:37
|
Karthik Kumar writes: > When I try to use the 1.4.0 API though, I could not get MinGW > to compile them. The Microsoft-supplied opengl32.dll (and thus the OpenGL headers corresponding to it) supports only OpenGL 1.1 (in software). Most curent graphics card vendors presumably support much newer OpenGL versions, though, in their so-called ICD (installable client driver, the hardware- and graphics-card-vendor-dependent thingie that opengl32.dll uses for accelerated graphics). To use newer features, you must use the OpenGL extension mechanism. Read up on wglGetProcAddress, for instance. You might also be interested in http://glew.sourceforge.net/ which is a wrapper library that hides the complexity of using OpenGL extensions. > So I wrote this small program to test my GL > environment. > #ifndef GL_VERSION_1_3 This obviously only tests the headers, not what's actually supported by the ICD. --tml |
From: Karthik K. <akk...@ya...> - 2004-10-05 04:01:48
|
--- Tor Lillqvist <tm...@ik...> wrote: > Karthik Kumar writes: > > When I try to use the 1.4.0 API though, I could not get MinGW > > to compile them. > > The Microsoft-supplied opengl32.dll (and thus the OpenGL headers > corresponding to it) supports only OpenGL 1.1 (in software). Most > curent graphics card vendors presumably support much newer OpenGL > versions, though, in their so-called ICD (installable client > driver, > the hardware- and graphics-card-vendor-dependent thingie that > opengl32.dll uses for accelerated graphics). To use newer features, > you must use the OpenGL extension mechanism. Read up on > wglGetProcAddress, for instance. You might also be interested in > http://glew.sourceforge.net/ which is a wrapper library that hides > the > complexity of using OpenGL extensions. Thanks for clarifying my doubts. > > > So I wrote this small program to test my GL > > environment. > > > #ifndef GL_VERSION_1_3 > > This obviously only tests the headers, not what's actually > supported > by the ICD. > To get the latest headers. I downloaded the Mesa implementation of OpenGL and am using the same. I was wondering whether MinGW can update the GL/gl.h in w32api package for us to use the latest API i.e. to go beyond opengl 1.1 . _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com |
From: Tor L. <tm...@ik...> - 2004-10-05 16:06:42
|
Karthik Kumar writes: > To get the latest headers. I downloaded the Mesa implementation > of OpenGL and am using the same. Even if you have headers for API introduced in OpenGL 1.2 and later (like glActiveTexture, glBlendColor or glGenBuffers) doesn't mean that you would magically get such entries in the opengl32.dll. Also make sure that the calling sequence specified in the headers match that in the DLL (i.e., stdcall). > I was wondering whether MinGW can update the GL/gl.h in w32api > package for us to use the latest API i.e. to go beyond opengl 1.1 . As that API isn't present in the Microsoft OpenGL implementation, only in some (most?) hardware vendor's ICDs, I don't think so. Besides, you would still have to use the wgl extension mechanism to actually use the new API. Why not just use the glew library that should make all this much easier? --tml |