Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


atg2012

Member Since 13 Sep 2012
Offline Last Active Sep 13 2012 09:50 PM

Topics I've Started

Texture Mapping from a skewed quadrilateral to a rectangle in OpenGL

13 September 2012 - 11:41 AM

I have a polygon with the texture mapped in perspective mode, but I am required to look at the polygon along its normal so that it appears to be in 2D plane and then map the texture back on to it.
To start with I have something like this:
Attached File  checker.jpg   13.08KB   26 downloads

and I want to see something like this after I position my camera to look along the normal of this polygon
Attached File  checker2.gif   1.35KB   34 downloads

But, the result is split into 2 triangles along the diagonal and the texture has an effect of Affine mapped texture.
My texture image is a 2D image but the rendering in OpenGL is in 3D World Co-ordinates.
Currently for texture mapping I am supplying the vertices of the polygon and corresponding 2D texture co-ordinates.
Could any one advice on what I am required to do in order to get correct texture mapping? Appreciate all your help.
Thanks,

PARTNERS