While i < submeshcount + 1
glEnable GL_TEXTURE_2D
glPolygonMode GL_FRONT_AND_BACK, GL_FILL
glBindTexture GL_TEXTURE_2D, texture(i + 1)
glDisable GL_CULL_FACE
glEnable GL_DEPTH_TEST
For j = 0 To vertexcounts(i) / 3 - 1
glBegin GL_TRIANGLES
glColor4f Colors(j * 12 + 1), Colors(j * 12 + 2), Colors(j * 12 + 3), Colors(j * 12 + 4)
etc.
glEnd
Next
Wend
Now it draws both submeshes (collections of vertices) just fine. It''s the texturing that''s amiss. If I trace this, it seems to do as it should...first binding texture "1", then number "2". These are the correct ones. If I specify 1 or 2 for the binding, it will obediently use that texture...but I can''t get it to use one texture for one submesh, and the other for the second. Did I do something off?
Strange binding behavior
I have a "draw" loop that works like this (yes, this is VB):
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement