tImageJPG *pImage = LoadJPG(aFile);
if(pImage == NULL)
return false;
glGenTextures(1, &mGLTexture);
if(mGLTexture == GL_INVALID_VALUE)
return false;
glBindTexture(GL_TEXTURE_2D, mGLTexture);
so if I set mGLTexture = 666 ... it will return 666...or whatever I tell it too. Never Invalid value ...
any ideas on why this is happening? I checked the code to make sure I have textures enabled ... and like I said, I have a test app that it works in ... but not here. both apps use the same code so I''m guessing its something I''m doing BEFORE I call this that is the difference.
glGenTextures
I''ve wrote a small app to test some texture fonts from NeHe''s tutorial to work with JPG''s instead of BMPs. Anyway...when I call glGenTextures it works in my test program ... but not in my app.
glGenTextures returns whatever I give it.
give it twice the same number and i bet it will return different numbers..
glGetError could return GL_INVALID_VALUE. always check errors with glGetError.
"take a look around" - limp bizkit
www.google.com
glGetError could return GL_INVALID_VALUE. always check errors with glGetError.
"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
Thanks for the tip ...
I checked it with glGetError and got an GL_INVALID_OPERATION
so now to figure out how/why its making it do that ...
I checked it with glGetError and got an GL_INVALID_OPERATION
so now to figure out how/why its making it do that ...
Error Codes
The following are the error codes generated and their conditions.
Error code Condition
GL_INVALID_VALUE n was a negative value.
GL_INVALID_OPERATION glGenTextures was called between a call to glBegin and the corresponding call to glEnd.
straight from MSDN in your favourite visual studio or webbrowser:D
uhm.. and check if glGetError does really return GL_NO_ERROR right before the call..
"take a look around" - limp bizkit
www.google.com
The following are the error codes generated and their conditions.
Error code Condition
GL_INVALID_VALUE n was a negative value.
GL_INVALID_OPERATION glGenTextures was called between a call to glBegin and the corresponding call to glEnd.
straight from MSDN in your favourite visual studio or webbrowser:D
uhm.. and check if glGetError does really return GL_NO_ERROR right before the call..
"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
Why do you want to pass numbers to it any way? glGenTextures returns the ID for the texture.
David Smithwww.geocities.com/gamespp5004-"If you can't dream it; it can't be done"-David Smith
was a test ... glGenTextures wasnt assigning the textureid. In other programs glGentextures reassigns it ... it appears to go in order 1, 2, 3 ect.
anyway ... lved the problem ... it wasnt in a glBegin or End. opengl wasnt completely initilized before I started loading textures. :\
anyway ... lved the problem ... it wasnt in a glBegin or End. opengl wasnt completely initilized before I started loading textures. :\
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement