Texture mapping single 3D object with one draw call
Hi!
I cannot seem to be able to texture map from one spritesheet with different iamges for different sides of a cube with one draw call.
I can accomplish this using 6 glDrawArrays call for each side and binding different parts of the spritesheet with each call.
Any advice on this would be helpful, thanks.
I cannot seem to be able to texture map from one spritesheet with different iamges for different sides of a cube with one draw call.
I can accomplish this using 6 glDrawArrays call for each side and binding different parts of the spritesheet with each call.
Any advice on this would be helpful, thanks.
Ought to be simple. Use GL_QUADS or GL_TRIANGLES (not one of the types like GL_TRIANGLE_STRIP that shares vertices between primitives), and pass different texture coordinates in your texCoord array for each face you draw.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Draw to texture using FBOs - aspect ratio issues | Madrayken | 2 | 3,299 |
Jul 15, 2010 11:47 AM Last Post: Madrayken |
|
| Changing Uniform Variables for a Single Shader | reapz | 3 | 4,477 |
Jul 15, 2010 01:29 AM Last Post: dazza |
|
| Texture Mapping: Loading a texture from a .bmp file? | ishrock | 5 | 5,013 |
Dec 13, 2008 09:27 AM Last Post: ThemsAllTook |
|
| Single buffered window | Rasterman | 9 | 5,367 |
Oct 15, 2007 10:40 AM Last Post: ThemsAllTook |
|
| OpenGL and cylindrical texture mapping | spsweet | 0 | 4,238 |
May 1, 2007 02:55 PM Last Post: spsweet |
|

