Jump to content
  • Advertisement
Sign in to follow this  
Omniscience

OpenGL Problems With GLEW

This topic is 3161 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've had OpenGL 1.x something for a while now (I don't even know anymore...) and I wanted to upgrade to at least 2.0. Since this is an absolutely hopeless notion, since as we all know, OpenGL updates are composed of tons of extensions instead of whole packages, I decided to give GLEW a try. I installed it, copying the .dll to system32, the libs to the lib folder, .h's to the include folder, and making my includes look like this:
#pragma comment(lib,"glew32.lib")
#define GLEW_STATIC 1;

#include <GL/glew.h>
#include <GL/glut.h>

//Then somewhere after glut initialization, call glewInit();
When I compile this, I get 102 errors having to do with redefinition of functions. For example,
Quote:
1>c:\program files\microsoft visual studio 9.0\vc\include\gl\gl.h(1205) : error C2373: 'glVertex3f' : redefinition; different type modifiers 1> c:\program files\microsoft visual studio 9.0\vc\include\gl\glew.h(1111) : see declaration of 'glVertex3f'
Along with many, and possibly all, other gl.h functions. Also, it starts off with a few different ones:
Quote:
1>c:\program files\microsoft visual studio 9.0\vc\include\gl\gl.h(125) : warning C4005: 'WINGDIAPI' : macro redefinition 1> c:\program files\microsoft visual studio 9.0\vc\include\gl\glew.h(136) : see previous definition of 'WINGDIAPI' 1>c:\program files\microsoft visual studio 9.0\vc\include\gl\gl.h(126) : warning C4005: 'APIENTRY' : macro redefinition 1> c:\program files\microsoft visual studio 9.0\vc\include\gl\glew.h(112) : see previous definition of 'APIENTRY' 1>c:\program files\microsoft visual studio 9.0\vc\include\gl\gl.h(127) : warning C4005: 'CALLBACK' : macro redefinition 1> c:\program files\microsoft visual studio 9.0\vc\include\gl\glew.h(128) : see previous definition of 'CALLBACK'
But I think they will fix themselves with the rest, when I find the solution to this problem. Thank you in advance for help.

Share this post


Link to post
Share on other sites
Advertisement
I would remove this line
#define GLEW_STATIC 1;

"I wanted to upgrade to at least 2.0 Since this is an absolutely hopeless notion, since as we all know"

GLEW just does the function loading process for you.

"OpenGL updates are composed of tons of extensions"

No. GL 2.0 is GL 2.0. There are no extensions.

You will of course need a few things like GL_EXT_framebuffer_object which are not core in GL 2.0

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!