Skip to main content
gamedev.net
🔒 Locked

'glGenFramebuffersEXT': identifier not found

Started by AverageJoeSSU Jan 8, 2008 at 2:01 AM 8 replies 6.8k views
Original Post
AverageJoeSSU
AverageJoeSSU
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.
------------------------------ redwoodpixel.com
Serge K
Serge K
glext.h only provides the types and constants.
You have to declare and initialize the function pointers yourself.

PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;

glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC) wglGetProcAddress( "glGenFramebuffersEXT" );
Arex
Arex
Yeah, GL spec doesn't require extension functions to be exported from library. That is why those need to be handled by yourself. :)
V-man
V-man
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.
AverageJoeSSU
AverageJoeSSU
So close!

im getting..... unresolved external symbol __imp____glewGenFramebuffersEXT

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

#include
#include "TCHAR.H"
#include
#include
//#include
//#include // Header File For The OpenGL32 Library
//#include // Header File For The GLu32 Library
//#include // Header File For The Glaux Library

when i include the others there are problems, and i cant seem to find the right order. ugh
------------------------------ redwoodpixel.com
NineYearCycle
NineYearCycle
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 when you're including as it will probably pull it in as well but you'll still need the and 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"
"Ars longa, vita brevis, occasio praeceps, experimentum periculosum, iudicium difficile" "Life is short, [the] craft long, opportunity fleeting, experiment treacherous, judgement difficult."
AverageJoeSSU
AverageJoeSSU
YES!

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

thanks a bunch
-J
------------------------------ redwoodpixel.com
NineYearCycle
NineYearCycle
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
"Ars longa, vita brevis, occasio praeceps, experimentum periculosum, iudicium difficile" "Life is short, [the] craft long, opportunity fleeting, experiment treacherous, judgement difficult."

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.