Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

alex997

can anyone explain this error?

This topic is 5375 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

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)?

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
Uh, you probably want testtex1.GetID().


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
DAMMIT! Of course! What a prime idiot!

Dunno what came over me, lack of sleep I guess. Ah well, won;t make that mistake again. Was just a bit flummoxed by the cryptic error message! "Missing (" might have been a better clue!

Cheers guys.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!