Jump to content
  • Advertisement
Sign in to follow this  
_WeirdCat_

OpenGL c++ opengl glBindTexture (use pointer)

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

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!