Archived

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

correct quad drawing with textured quad!!

This topic is 5040 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

ok, i was playing ard with texture loading and combining it with drawing a colored worldspaced quad. ok suppose a textured quad has a set of arbitrary dimensions: bottomleft corner (-1,-1) bottomright corner (1,-1) topright corner (1,1) topleft corner (-1,1) then the colored quad has this set of arbitrary dimensions: bottomleft corner (-0.1,-0.1) bottomright corner (0.1,-0.1) topright corner (0.1,0.1) topleft corner (-0.1,0.1) my problem: whenever i draw the colored quad with the textured quad, the colored quad always overlaps the textured quad entirely, which if u see the above arbitrary coordinates, this should not happen. interestingly, when i did not draw the textured quad, the colored quad draws fine at the precise arbitrary coordinates above. a snapshot of the code i used
//try to draw textured quad

GL.glPushMatrix()
GL.glEnable(Convert.ToUInt32(GLFlags.GL_TEXTURE_2D))

GL.glBindTexture(Convert.ToUInt32(GLFlags.GL_TEXTURE_2D), textureID(0))
DrawTexturedQuad(texturedQuad)

GL.glPopMatrix()
GL.glDisable(Convert.ToUInt32(GLFlags.GL_TEXTURE_2D))

//try to draw colored quad

GL.glPushMatrix()
DrawColoredQuad(coloredQuad)
GL.glPopMatrix()
need some helps! thx! Edwinz [edited by - edwinnie on February 21, 2004 5:25:41 AM] [edited by - edwinnie on February 21, 2004 5:26:08 AM]

Share this post


Link to post
Share on other sites