Skip to main content
GameDev.net gamedev.net
🔒 Locked

vba textures?

Started by Shadowwoelf Aug 18, 2008 at 9:47 PM 4 replies 1.2k views
Original Post
Shadowwoelf
Shadowwoelf
I am reading up vba and I was wondering how do you add textures to each quad?
Shadowwoelf
Shadowwoelf
I looked up vbo's but I cant seem to find any examples where they use textures with the quads. So if I want to use texture will I have to use immediate mode?
songho
songho
I think your question is how to draw a polygon with texture, but other than in immediate mode. If so, please look for Vertex Array (VA) and VBO.

You can store st (uv) texture coordinates into a VBO or Vertex Array (VA) along with other vertex information, such as position, colour, normals, etc. But, actual texels are still in OpenGL texture object.
Shadowwoelf
Shadowwoelf
But I am confused on how to use a vertex array or vbo with textures.

So would I just call glbindtexture before I call something like glDrawArrays(GL_TRIANGLES, 0, VertexCount);?
V-man
V-man
Quote:
Original post by Shadowwoelf
But I am confused on how to use a vertex array or vbo with textures.

So would I just call glbindtexture before I call something like glDrawArrays(GL_TRIANGLES, 0, VertexCount);?


In order to bind a texture, you call glBindTexture. I think that's obvious and also there are plenty of examples on the net.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.