Download Opengl 2.0

Started by
17 comments, last by V-man 14 years, 1 month ago
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?
Advertisement
When you say "it fails", what do you mean? Runtime error, compile error? Nothing printed? IS glPrint from NeHe, in which case did you BuildFont?
Sorry for the confusion. By 'fails,' I just meant that it said glewsupported is false. I created the window and all, just as Brother Bob advised, but it isn't returning true when i call the glewIsSupported function.
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 ]
You need to make sure the right GL version is there in order to use GLSL.
You need 2.0 minimum.
Check with glGetString(GL_VERSION)
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
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.
Since GL 3.2 is > 2.0, you have support for it.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
V-man: Yes, I realize I have support for it. The question I have is why it says that I don't have support for it. I would like to know what exactly is wrong with my code, and why wgl says that I don't have support for it.
Are you saying glewIsSupported("GL_VERSION_2_0") returns false?

Maybe update GLEW.
I use GLEW but I don't use glewIsSupported. I never had problems.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

This topic is closed to new replies.

Advertisement