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

## Recommended Posts

i have been at this for the past hour... i checked my gl.h.. its 1.1 i dont have glee... im using glext.h i see the definition of the functions....

#include <windows.h>
#include "TCHAR.H"

#include <gl\gl.h>			// Header File For The OpenGL32 Library
#include <gl\glu.h>			// Header File For The GLu32 Library
#include <gl\glext.h>

{
this->Position = 100;
this->DiffuseColor = 101;
this->Normal = 102;

glGenFramebuffersEXT(1, &Position); // ERROR is here

}



##### Share on other sites
Are you sure glext.h contains it?

Do you have the right library?

##### Share on other sites
glext.h only provides the types and constants.
You have to declare and initialize the function pointers yourself.

PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;

glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC) wglGetProcAddress( "glGenFramebuffersEXT" );

##### Share on other sites
Yeah, GL spec doesn't require extension functions to be exported from library. That is why those need to be handled by yourself. :)

##### Share on other sites
Everything you need to know to get started is explained here
http://www.opengl.org/wiki/index.php/Getting_started

Don't waste time writing "wglGetProcAddress" for every function you need. glew and glee can do that for you and the link I gave gives you the links.

##### Share on other sites
Thanks guys... im glad its that easy

##### Share on other sites
So close!

im getting..... unresolved external symbol __imp____glewGenFramebuffersEXT

here is the order of what i am including....

#include <windows.h>
#include "TCHAR.H"
#include<gl\glew.h>
#include<gl\glext.h>
//#include<gl\glee.h>
//#include <gl\gl.h> // Header File For The OpenGL32 Library
//#include <gl\glu.h> // Header File For The GLu32 Library
//#include <gl\glaux.h> // Header File For The Glaux Library

when i include the others there are problems, and i cant seem to find the right order. ugh

##### Share on other sites
Quote:
 Original post by AverageJoeSSU#include #include "TCHAR.H"#include#include // Header File For The OpenGL32 Library#include // Header File For The GLu32 Library

I don't think you need the other <glext.h> when you're including <glew.h> as it will probably pull it in as well but you'll still need the <gl.h> and <glu.h> headers if you want to use something in them... maybe, I think. I'm not sure as I use glew or glee with GLUT most of the time so ymmv.

Andy

*EDIT* also are you linking with the correct lib? glew32.lib
You can do it with a pragma comment like below, just put it above the #includes.
#pragma comment( lib, "glew32.lib" )

or you can make sure that you've got them all in your linker inputs.
bring up your projects properties (this part might be different for VS6 as i'm using VSExpress) then open:

##### Share on other sites
YES!

Good call on the EDIT, that is EXACTLY what was wrong.

thanks a bunch
-J

##### Share on other sites
Glad to help out, it's always a much simpler problem than it seems at first and that's one that I always forget about ;)

Andy

1. 1
Rutin
49
2. 2
3. 3
4. 4
5. 5

• 10
• 28
• 20
• 9
• 20
• ### Forum Statistics

• Total Topics
633410
• Total Posts
3011727
• ### Who's Online (See full list)

There are no registered users currently online

×