PDA

View Full Version : 2d rectangle in a 3d world



luisillo
02-15-2007, 01:12 AM
Hi!

Please, see the images below to understand my problem (my english is so bad...)

I'm trying to paint a 2d rectangle in a point of a 3d world. I need that this rectangle doesn't have any deformation and i need it with a know size (in pixels). Now i can do that painting with the projection gluOrtho2D, but i have a problem, the Z Buffer doesn't work (i know that its no correct). Any idea how to do that?

Now:
http://img143.imageshack.us/img143/6634/imagenowmq0.jpg

Expected:
http://img71.imageshack.us/img71/1636/resultexpectedfl3.jpg

thanks in advance!

ZbuffeR
02-15-2007, 01:24 AM
Search billboarding

luisillo
02-15-2007, 01:31 AM
Orienting the polygon based on the view direction is called billboarding...
(First entrance at google)

Now i know what was my problem :)

A lot of thanks, zbuffer!