Red texture:
up vertex 0.5 0.0 0
down vertex 0.5 1.0
down right vertex 1.5 1.0
Thing is, you can't stop texture drawing midway of a triangle. Red part texture will show under that green one, and green will be drawn on top of whole of red. What prevents this is alpha channel of texture. (Only green texture in this case needs alpha if it is drawn after the red one)
Green texture coordinates:
up -0.5 0.0
down -0.5 1.0
down right 0.5 1.0
Last edited by User137; 15-02-2011 at 03:50 PM.
Thank you User123.
If I understand you correctly, both of the textures must be in GL_REPEAT mode, right?
GL_REPEAT is on by default, and ye that is the most useful one. If you try to draw with texture coordinates outside 0..1 (in this case you have coordinates to -0.5 and 1.5) then the rendering takes rules of what clamp is set to.
Bookmarks