Archived

This topic is now archived and is closed to further replies.

Strange binding behavior

This topic is 5584 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a "draw" loop that works like this (yes, this is VB):
    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?

Share this post


Link to post
Share on other sites