Home » Community » Forums » OpenGL » 'glGenFramebuffersEXT': identifier not found
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 'glGenFramebuffersEXT': identifier not found
Post New Topic  Post Reply 
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>

DeferredShading::DeferredShading()
{
	this->Position = 100;
	this->DiffuseColor = 101;
	this->Normal = 102;

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

}









error is 'glGenFramebuffersEXT': identifier not found
im using VS6.1 i believe.


 User Rating: 1055   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Are you sure glext.h contains it?

Do you have the right library?

Sincerely,
Arto Ruotsalainen
Dawn Bringer 3D - Tips & Tricks


 User Rating: 1069   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

glext.h only provides the types and constants.
You have to declare and initialize the function pointers yourself.

PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;

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

 User Rating: 1036   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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

Sincerely,
Arto Ruotsalainen
Dawn Bringer 3D - Tips & Tricks


 User Rating: 1069   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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.

 User Rating: 1302   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Thanks guys... im glad its that easy

 User Rating: 1055   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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

 User Rating: 1055   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by AverageJoeSSU
#include <windows.h>
#include "TCHAR.H"
#include<gl\glew.h>
#include <gl\gl.h> // Header File For The OpenGL32 Library
#include <gl\glu.h> // 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:
linker->inputs->additional dependencies = "glu32.lib glut32.lib opengl32.lib glew32.lib"

 User Rating: 1195   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

YES!

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

thanks a bunch
-J

 User Rating: 1055   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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

 User Rating: 1195   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: