//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]
correct quad drawing with textured quad!!
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
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
"Unfortunatly, when I sent the email, instead of writing "Best Regards" I ended up writing "Best Retards." - boolean
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement