Download Opengl 2.0
Started by Phynix, Mar 15 2010 03:35 AM
18 replies to this topic
Sponsor:
#2 Members - Reputation: 433
Posted 15 March 2010 - 03:41 AM
OpenGL 2.0 and higher isn't "downloaded" as such...the headers may or may not be downloaded from openGL.org, or installed with your graphics vendors SDK, but the actual code for OpenGL that you link with is a part of your graphics hardware's graphics subsystems. You may need to use a library like GLEW
#4 Members - Reputation: 129
Posted 15 March 2010 - 04:34 AM
OK, thanks for the quick replies. The reason I'm asking is that before I had vista, and I was able to use glsl, as I had opengl 2.0 and GLEW_ARB_vertex_shader & GLEW_ARB_fragment_shader extensions available. However, after upgrading to windows 7, I didn't. I'm going back to glsl now, and I can't find a way of using it. I have glew installed.
#6 Members - Reputation: 129
Posted 15 March 2010 - 03:15 PM
OK. Well it's sorta weird. Over at the exe file that can be downloaded from Nehe lesson 24 (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=24), it says that I have the extensions required, and that I have version 3.2.0. However, my version of GL.h says "#define GL_VERSION_1_1." Also, I cannot use those extensions via the code at http://www.lighthouse3d.com/opengl/glsl/index.php?ogloverview:
#include <GL/glew.h>
#include <GL/glut.h>
void main(int argc, char **argv) {
glutInit(&argc, argv);
...
glewInit();
if (GLEW_ARB_vertex_shader && GLEW_ARB_fragment_shader)
printf("Ready for GLSL\n");
else {
printf("Not totally ready :( \n");
exit(1);
}
setShaders();
glutMainLoop();
}
or the other (opengl 2.0 version; I didn't feel like pasting it here for space purposes) But I really have no clue what's going on right now.
#include <GL/glew.h>
#include <GL/glut.h>
void main(int argc, char **argv) {
glutInit(&argc, argv);
...
glewInit();
if (GLEW_ARB_vertex_shader && GLEW_ARB_fragment_shader)
printf("Ready for GLSL\n");
else {
printf("Not totally ready :( \n");
exit(1);
}
setShaders();
glutMainLoop();
}
or the other (opengl 2.0 version; I didn't feel like pasting it here for space purposes) But I really have no clue what's going on right now.
#7 Members - Reputation: 1275
Posted 15 March 2010 - 03:39 PM
Quote:
Original post by http://www.opengl.org/wiki/Getting_started
Microsoft will never update gl.h and opengl32.lib that comes with their compiler. It hasn't been updated since 1995. Basically, the solution is to use glext.h and wglext.h (wglext.h is for Windows only) which define all the GL 1.2, 1.3, 1.4, 1.5, 2.0, 2.1 and above tokens and functions.
[wink]
#8 Members - Reputation: 129
Posted 16 March 2010 - 08:58 AM
Thanks Oberon_Command. My guess is to just include the *.h files (wglext, glext, and glxext) to my source, right? Are there any libs that come with the source or anything like that?
The reason I'm asking is because it doesn't work :( I create a windows console app, put this code in, change the linker input properties, and run the file.
#include <GL/glew.h>
#include <GL/glut.h>
#include "wglext.h"
#include "glext.h"
#include <iostream>
using namespace std;
void main(int argc, char **argv) {
glutInit(&argc, argv);
glewInit();
if (GLEW_ARB_vertex_shader && GLEW_ARB_fragment_shader)cout <<("Ready for GLSL\n");
else cout<<("Not totally ready :( \n");
char c;cin>>c;
}
It doesn't work. or at least it prints "Not totally ready :(".
The reason I'm asking is because it doesn't work :( I create a windows console app, put this code in, change the linker input properties, and run the file.
#include <GL/glew.h>
#include <GL/glut.h>
#include "wglext.h"
#include "glext.h"
#include <iostream>
using namespace std;
void main(int argc, char **argv) {
glutInit(&argc, argv);
glewInit();
if (GLEW_ARB_vertex_shader && GLEW_ARB_fragment_shader)cout <<("Ready for GLSL\n");
else cout<<("Not totally ready :( \n");
char c;cin>>c;
}
It doesn't work. or at least it prints "Not totally ready :(".
#11 Members - Reputation: 129
Posted 16 March 2010 - 10:33 AM
This may be another simple question, but it's not working again:
Once again, it's not working. I put the code:
string prnt="FPS: %2i | %2i | Room: "+map.currentRoom().getName();
if(glewIsSupported("GL_VERSION_2_0"))glewsupported=true;
if(glewsupported)prnt.append(" glew: supported");
else prnt.append(" glew: not supported");
glPrint(prnt.c_str(), FPS.count, FPS.frames);
And it fails. I am using the same tests as in my console application, except this time from a win32 application. The code above is in my render function, and thus gets called every frame after the window is created. Do I need to somehow link the window to glew?
Once again, it's not working. I put the code:
string prnt="FPS: %2i | %2i | Room: "+map.currentRoom().getName();
if(glewIsSupported("GL_VERSION_2_0"))glewsupported=true;
if(glewsupported)prnt.append(" glew: supported");
else prnt.append(" glew: not supported");
glPrint(prnt.c_str(), FPS.count, FPS.frames);
And it fails. I am using the same tests as in my console application, except this time from a win32 application. The code above is in my render function, and thus gets called every frame after the window is created. Do I need to somehow link the window to glew?
#14 Members - Reputation: 264
Posted 16 March 2010 - 11:01 PM
Maybe obvious... Did you upgrade your video drivers ?
- Iliak -
[ ArcEngine: An open source .Net gaming framework ]
[ Dungeon Eye: An open source remake of Eye of the Beholder II ]
[ ArcEngine: An open source .Net gaming framework ]
[ Dungeon Eye: An open source remake of Eye of the Beholder II ]
#16 Members - Reputation: 129
Posted 17 March 2010 - 09:11 AM
Yes, I did update the most recent video drivers from nVidia, and it says that I have version 3.2.0 when I call glGetString(GL_VERSION). What I'm thinking is that like Brother Bob said, I think it's a problem with linking the context somehow; I would think it's linked since it displays an opengl scene, but it says I don't have support for it.






