correct quad drawing with textured quad!!

Started by
1 comment, last by edwinnie 20 years, 1 month ago
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]
Advertisement
You probably didn''t enable depth testing correctly.


"Unfortunatly, when I sent the email, instead of writing "Best Regards" I ended up writing "Best Retards." - boolean
-~-The Cow of Darkness-~-
how is your windings setup CCW or CW?

This topic is closed to new replies.

Advertisement