Jump to content
  • Advertisement
Sign in to follow this  
KKTHXBYE

OpenGL c++ opengl glBindTexture (use pointer)

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

is this valid or do i have to change something cause i dont see anything in my fbo and i am searching for bad code ;x
 



inline void DrawFullScrQuad(unsigned int * tex)
{
glBindTexture(GL_TEXTURE_2D, (*tex));
}


unsigned int bleble;


void main()
{
DrawFullScrQuad(&bleble);
}

i am not sure if i can pass a pointer like that here

 

Share this post


Link to post
Share on other sites
Advertisement

You pass in a pointer address to the create function so it can fill in your integer with a new value from the GPU. You use that integer to reference that texture. Not sure why you are passing anything other than that integer around.

 

Assuming you did glGenTextures(1, &bleble), then you are fine.

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!