Jump to content
  • Advertisement
Sign in to follow this  
AverageJoeSSU

OpenGL 'glGenFramebuffersEXT': identifier not found

This topic is 3878 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 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.

Share this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
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"

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!