Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualhaegarr

Posted 12 November 2013 - 07:08 AM


is this the right way to bind bitmap to gl?

Nope. You're creating a vertex buffer with that but want to create a texture. Try out "tutorial opengl texture mapping" in your favorite search engine.

 

The terms of interest are: glGenTexture, glBindTexture, glTexParameter, glTexImage2D, and companions. However, You need some geometry (a rectangle would be sufficient in your case) to map the texture onto the screen, for which purpose a vertex buffer can (better: should, nowadays) be used.


#1haegarr

Posted 12 November 2013 - 06:59 AM


is this the right way to bind bitmap to gl?

Nope. You're creating a vertex buffer with that but want to create a texture. Try out "tutorial opengl texture mapping" in your favorite search engine.


PARTNERS