can anyone explain this error?
What does this mean?
error C2664: ''glBindTexture'' : cannot convert parameter 2 from ''unsigned int (void)'' to ''unsigned int''
Surely an unsigned int is an unsigned int? What''s unsigned int (void)?
Strange, really really strange. Are you passing a pointer (/array)? (just a question you'll never know).
EDIT: looks like you are passing a function instead of a variable!
[edited by - Tree Penguin on March 24, 2004 4:15:52 PM]
EDIT: looks like you are passing a function instead of a variable!
[edited by - Tree Penguin on March 24, 2004 4:15:52 PM]
it means that there is some problem with the variable(an unsigned int) that contains the address of the texture your trying to load.
i need some code to tell you more.
---------------------------------
For an overdose of l33tness, flashbang.nu
i need some code to tell you more.
---------------------------------
For an overdose of l33tness, flashbang.nu
Hi Tree Penguin,
I'm passing a member function of my texture class. Now that's got me thinking!...
My call is
glBindTexture(GL_TEXTURE_2D, testtex1.GetID);
The definition of the function is:
GLuint CTexture::GetID(void) {return tex_id};
Hmm, I think that must be it.
Can't I pass a function then? I thought it'd just plug in the value returned...
[edited by - alex997 on March 24, 2004 4:19:25 PM]
I'm passing a member function of my texture class. Now that's got me thinking!...
My call is
glBindTexture(GL_TEXTURE_2D, testtex1.GetID);
The definition of the function is:
GLuint CTexture::GetID(void) {return tex_id};
Hmm, I think that must be it.
Can't I pass a function then? I thought it'd just plug in the value returned...
[edited by - alex997 on March 24, 2004 4:19:25 PM]
Uh, you probably want testtex1.GetID().
"Sneftel is correct, if rather vulgar." --Flarelocke
"Sneftel is correct, if rather vulgar." --Flarelocke
You need to add the () to make it a function call. i.e.:
glBindTexture(GL_TEXTURE_2D, testtex1.GetID());
edit: Darn you, Sneftel! Beat me by just 7 seconds.
[edited by - SiCrane on March 24, 2004 4:21:05 PM]
glBindTexture(GL_TEXTURE_2D, testtex1.GetID());
edit: Darn you, Sneftel! Beat me by just 7 seconds.
[edited by - SiCrane on March 24, 2004 4:21:05 PM]
actuarly you do pass a function
this glBindTexture(GL_TEXTURE_2D, testtex1.GetID);
should be this glBindTexture(GL_TEXTURE_2D, testtex1.GetID());
as it is now you pass the function testtex1.GetID to glBindTexture, not the result you get when you run the function.
- Perhaps! -
---------------------------------
For an overdose of l33tness, flashbang.nu
this glBindTexture(GL_TEXTURE_2D, testtex1.GetID);
should be this glBindTexture(GL_TEXTURE_2D, testtex1.GetID());
as it is now you pass the function testtex1.GetID to glBindTexture, not the result you get when you run the function.
- Perhaps! -
---------------------------------
For an overdose of l33tness, flashbang.nu
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement