|
This thread is locked; no one can reply to it. |
1
2
|
How to obtain OpenGL 2.1. Revisited: Gods.. heed my call! |
Albin Engström
Member #8,110
December 2006
|
This is pretty serious business my friends, I'm going mad with this old version of openGL. My last thread about this began pretty nicely with Thomas Fjellstrom telling me to find some updated headers, i searched but found nothing. I'm not really sure what to go for and I'm not even sure exacly what version of openGL i have, I know i don't have 2.1 because i can't use the things that were made into core features for the 2.1 version, like for example glCreateProgram. This is not about shaders or extentions at all, i just don't want to use something that's older than what i can use. (i do want to use shaders..). Please share your wisdom. (and don't tell me to go for extensions or glut or similar things) Thanks! |
Vanneto
Member #8,643
May 2007
|
Well, AFAIK updating just the headers wont do anything because the .dll will still be at version 1.2. If you want a newer version, you will need updated headers + libraries + updated .dll. But I am not really sure where you can get all this. Maybe the open source MESA 3D implementation uses a updated version of the .dll. I don't really know, why not give it a try? Good luck. In capitalist America bank robs you. |
Albin Engström
Member #8,110
December 2006
|
Thanks vanneto, unfortunately i found nothing except modified openGL headers . No wait, here's something, the openGL32.dll and openGL32.lib. Hmm.. As far as i know openGL 2.1 was released 2006, this openGL32.lib was created 2004. Besides i cannot find any pure openGL headers :/. |
Vanneto
Member #8,643
May 2007
|
I could be wrong, but maybe there is no 2.1 version on Windows, maybe you DO need to use the features through the extensions. Thats just a guess though, I don't really know. I hope there is someone who has an answer to this because now I got curious. In capitalist America bank robs you. |
Kitty Cat
Member #2,815
October 2002
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Here's an OpenGL extension viewer that Sirocco linked to a while back : It crashes during the rendering test if I run it on my laptop but not on my desktop , but it has all kinds of useful information about what extensions you have installed and what your graphics card can do. - Kitty Cat - My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Thomas Fjellstrom
Member #476
June 2000
|
Quote: Does having up to date graphics card drivers allow windows users to use later versions of OpenGL? Only, and ONLY if the drivers replace the OpenGL32.dll file itself. Which I don't think happens (anymore, I thought it was something the drivers were aloud to do, but I've heard otherwise...), even though thats the way its done on linux, libGL.so.x is replaced/installed with your GFX drivers, which hook directly into your particular graphics hardware. -- |
Milan Mimica
Member #3,877
September 2003
|
http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getstring.html Updated headers don't help much. You can write your own declarations, that's trivial to do.
-- |
Kitty Cat
Member #2,815
October 2002
|
Quote: glGetString(GL_VERSION) returns... guess what. Unfortunately, that's just the driver's version for the current context. opengl32.dll and/or its import lib don't export core functions above version 1.1 (unless that's changed recently? Vista might have up to 1.4 exported (ooh, ahh..)). -- |
Albin Engström
Member #8,110
December 2006
|
I cannot accept that one cannot use anything but openGL 1.1, I took another look at glew and it says: glew said: The latest release contains support for OpenGL 2.1 and the following extensions note the "support for OpenGL 2.1", does that mean that if I use glew i get access to openGL 2.1 functionality? Anyway, I tried to include glew into my project but I'm such a retard when it comes to linking and stuff like that . compiler said: ..\Objects\main.o:main.cpp: (.text+0x2a7)||undefined reference to `_imp____glewCreateProgram'| This is how i include glew: #ifdef WIN32 #include <windows.h> #endif #include <gl/glew.h> #include <gl/gl.h> I'm using codeblocks so the linker is a bit retarded, I can't change the order of linking without removing everything from the list first, I'm not sure I'm in the right place so I'll post a picture: {"name":"595364","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/e\/3e13a9c2fe0a31b7954721e47df0a42a.png","w":672,"h":514,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/e\/3e13a9c2fe0a31b7954721e47df0a42a"} What's worse is that there are two different "build options" the one i posted a picture of was the "project build option" the other is named simply "build option"... It's very confusing having them both around.. please explain. Thank you very much. |
GullRaDriel
Member #3,861
September 2003
|
Albin said: I can't change the order of linking without removing everything from the list first {"name":"595365","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/c\/7c37a0476b193a01e4b43b596bd3aecf.png","w":672,"h":514,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/c\/7c37a0476b193a01e4b43b596bd3aecf"} Hahem, you see the two buttons there ? "Code is like shit - it only smells if it is not yours" |
Albin Engström
Member #8,110
December 2006
|
Tehe... ... Nothing changes when i switch their order, I mean, I still get linking errors about _imp____glewCreateProgram. |
gnolam
Member #2,030
March 2002
|
So just use AllegroGL. -- |
Thomas Fjellstrom
Member #476
June 2000
|
Quote: note the "support for OpenGL 2.1", does that mean that if I use glew i get access to openGL 2.1 functionality? Windows does NOT provide a OpenGL 2.x dll. GL however allows a driver to provide extensions to the spec which any and all OpenGL 2.x features will be pushed in as (most/all started as extensions to OpenGL 1.x anyhow) Both glew and AllegroGL will load extensions for you. I'd personally go with AllegroGL if you're even remotely familiar with Allegro already and you don't want to switch away. -- |
Wagner Soares
Member #9,011
September 2007
|
does AllegroGL have support to shaders? [EDIT] |
Thomas Fjellstrom
Member #476
June 2000
|
edit: nm. -- |
Milan Mimica
Member #3,877
September 2003
|
Quote: Unfortunately, that's just the driver's version for the current context. opengl32.dll and/or its import lib don't export core functions above version 1.1 Exactly. If glGetString(GL_VERSION) returns a version that doesn't guarantee that the wanted feature is in the core (whatever the reason might be), you can check if the extension is listed in glGetString(GL_EXTENSIONS) and load it. This is how you do it with OpenGL, no matter what OS are you running. AllegroGL and other libs can do this things for you.
-- |
Albin Engström
Member #8,110
December 2006
|
Yes yes, AllegroGL is fantastic, but I don't want to use AllegroGL. Stupid glew.. |
Arthur Kalliokoski
Second in Command
February 2005
|
Quote: Nothing changes when i switch their order, I mean, I still get linking errors about _imp____glewCreateProgram. IIRC, I seen some old code that needed to include at least one library twice due to circular dependencies. They all watch too much MSNBC... they get ideas. |
Arvidsson
Member #4,603
May 2004
|
Have you tried including the sourcefiles directly into your project and not use the library?
|
Albin Engström
Member #8,110
December 2006
|
. When i try to include the source file instead of the library things go well up to a point where it says: "X:#Project\Source\glew.c|5413|undefined reference to `_imp__glewExperimental'|" It seems as if it checks this if openGL 2.1 has been defined.. Might it have something to do with me updating the gl headerfiles? Well, dammit, does glew only load extensions? I think I can do that myself. |
Thomas Fjellstrom
Member #476
June 2000
|
You know, if you don't use AllegroGL you're going to have to implement all of what it does yourself. Whats the point in that? You could have started working on your actual program already. Allegro alone does NOT work well with GL. Infact if you just use plain Allegro 4.2, you're stuck with a non GL compatible window. So now you need to stop using allegro's gfx, and input (input is tied to the window) all together and code all of that stuff yourself. The only way to use allegro's GFX with GL and not use AllegroGL is to draw to memory bitmaps and turn them into textures yourself (AllegroGL provides a function for that, but you don't want to use AllegroGL for some unknown and silly reason). -- |
GullRaDriel
Member #3,861
September 2003
|
In case it helps, here is what I use in my Makefile. Please only take a look at the opengl and gl things ;-p -lnilorea -lagl_s -lalleg -luser32 -lgdi32 -lopengl32 -lglu32 -lglaux -lwsock32 -lws2_32 -lpthreadGC2 -lWinmm -mwindows "Code is like shit - it only smells if it is not yours" |
Albin Engström
Member #8,110
December 2006
|
Sorry for the delay, I've been sick and my head hasn't worked well, I don't want to program when I'm such a state. Thomas Fjellstrom said: You know, if you don't use AllegroGL you're going to have to implement all of what it does yourself. Whats the point in that? You could have started working on your actual program already. Allegro alone does NOT work well with GL. Infact if you just use plain Allegro 4.2, you're stuck with a non GL compatible window. So now you need to stop using allegro's gfx, and input (input is tied to the window) all together and code all of that stuff yourself. The only way to use allegro's GFX with GL and not use AllegroGL is to draw to memory bitmaps and turn them into textures yourself (AllegroGL provides a function for that, but you don't want to use AllegroGL for some unknown and silly reason). While AllegroGL makes the job a lot easier, it makes it's user miss a lot of things that I feel is important to know. On a friends computer any allegro application takes 15-30 seconds to load, this makes me feel like I have no control over certain aspects of my game, and I hate that feeling. You might think it's a dumb decision to not use AllegroGL but I feel like I gain a lot from doing so, it increases my understanding of how things work and makes it easier for me to overcome other problems. Thank you Gull, unfortunately I'm not sure i can absorb the help you are trying yo give me. I link against 3 of the things you link against (-lgdi32 -lopengl32 -lglu32), i changed their order to match yours, I don't know what to think about lglaux, isn't glaux some old out dated library with a similar purpose of glut? Maybe i should try to restore the original openGL header and try the direct include approach again. |
Milan Mimica
Member #3,877
September 2003
|
Headers are not crucial. All you need is wglGetProcAdress() on Windows and glxGetProcAdress() on X11. These are defined in OpenGL libs. You use them to get the address of the function, after you have checked that the extension is supported by examining the output of glGetString(GL_EXTENSIONS). Then when you have the pointer to a function you want to call, you call it. That's when the headers kick in, for various #defines for functions arguments, and actual argument list. The most up to date headers and extension documentation is on http://www.opengl.org/registry/.
-- |
|
1
2
|