View Full Version : Texturing with bitmaps

03-10-2006, 07:37 AM
I am trying to figure out a way to texture a non-rectangular plane (say a triangle) with a rectangular bitmap, and do so while avoiding the warping of the bitmap image that normally occurs

Is there any way to tell OpenGl that I want it to simply clip the portion of the bitmap that dosnt fit onto the surface...

(let me know if my question isn't clear, I'm sure I am using some incorrect terminology [GL noob])

03-10-2006, 08:06 AM
use same texcoords as for quad

03-10-2006, 09:12 AM
set texparameters GL_TEXTURE_WRAP_T and WRAP_S to GL_CLAMP, that will cause the bitmap to be shown just "once"

then set the texcoords of the triangle in such a fashon that within the triangle a region exists that has texcoords from 0-1 (that is where your bitmap will show)