Jump to content
  • Advertisement


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

Brother Erryn

Strange binding behavior

This topic is 5862 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)
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
Guest Anonymous Poster
try adding i = i + 1

Share this post

Link to post
Share on other sites
Err...ummm...actually, that code was in there, I was just a bit overzealous with my code trimming.

I did figure out the real problem, and it wasn''t much better. Stupid coding on my part.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!