Jump to content

  • Log In with Google      Sign In   
  • Create Account


Download Opengl 2.0


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
18 replies to this topic

#1 Phynix   Members   -  Reputation: 129

Like
0Likes
Like

Posted 15 March 2010 - 03:35 AM

Where can I download opengl 2.0 or later? The opengl that came with vc++ was version 1.1, and for some reason i couldn't find it on the opengl website.

Sponsor:

#2 Steve132   Members   -  Reputation: 433

Like
0Likes
Like

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

#3 frca   Members   -  Reputation: 144

Like
0Likes
Like

Posted 15 March 2010 - 03:42 AM

You need to download GLEW library or similar, it adds functionality of newer versions of OpenGL. It's a wrapper around OpenGL extension mechanism. That means you can only use the functionality your graphics card/driver supports.

#4 Phynix   Members   -  Reputation: 129

Like
0Likes
Like

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.

#5 V-man   Members   -  Reputation: 805

Like
0Likes
Like

Posted 15 March 2010 - 04:35 AM

Everything is explained in the wiki
http://www.opengl.org/wiki/Getting_started

#6 Phynix   Members   -  Reputation: 129

Like
0Likes
Like

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.

#7 Oberon_Command   Crossbones+   -  Reputation: 1859

Like
0Likes
Like

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 Phynix   Members   -  Reputation: 129

Like
0Likes
Like

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 :(".

#9 Brother Bob   Moderators   -  Reputation: 8013

Like
0Likes
Like

Posted 16 March 2010 - 09:08 AM

You need to create a window also, or you don't have a rendering context to work with.

#10 Phynix   Members   -  Reputation: 129

Like
0Likes
Like

Posted 16 March 2010 - 09:24 AM

oh....lol....you can tell I'm new to graphics theory and the OpenGL pipeline and all the other lower level elements. But thanks it works now!

#11 Phynix   Members   -  Reputation: 129

Like
0Likes
Like

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?

#12 rip-off   Moderators   -  Reputation: 8113

Like
0Likes
Like

Posted 16 March 2010 - 10:44 AM

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?

#13 Phynix   Members   -  Reputation: 129

Like
0Likes
Like

Posted 16 March 2010 - 01:16 PM

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.

#14 iliak   Members   -  Reputation: 275

Like
0Likes
Like

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 ]

#15 V-man   Members   -  Reputation: 805

Like
0Likes
Like

Posted 17 March 2010 - 05:48 AM

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)

#16 Phynix   Members   -  Reputation: 129

Like
0Likes
Like

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.

#17 V-man   Members   -  Reputation: 805

Like
0Likes
Like

Posted 18 March 2010 - 03:27 AM

Since GL 3.2 is > 2.0, you have support for it.


#18 Phynix   Members   -  Reputation: 129

Like
0Likes
Like

Posted 18 March 2010 - 09:16 AM

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.

#19 V-man   Members   -  Reputation: 805

Like
0Likes
Like

Posted 19 March 2010 - 04:20 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS