Draw a 2D image with a depth
Posted: Fri Apr 23, 2010 5:40 pm
Hi all!
I need to order the 2d images regardless the order of they drawing. So, Can anyone please tell me how to draw 2d images with a depth. I did it with pure OpenGL, but I started to port that code into IrrLicht. Now I can't find a way to do it.
I'm talking about something like this,
Please forgive me if this is a noob one , that is because this is my first time at IrrLicht. I'm asking this after spending a almost a day to find the solution
Thank you very much..
Regards,
Maleesh
I need to order the 2d images regardless the order of they drawing. So, Can anyone please tell me how to draw 2d images with a depth. I did it with pure OpenGL, but I started to port that code into IrrLicht. Now I can't find a way to do it.
I'm talking about something like this,
Code: Select all
glBegin(GL_QUADS);
//Top-left
glTexCoord2f(l, t);
glVertex3f(x, YY, _depth);
// Top-right
glTexCoord2f(r, t);
glVertex3f(XX, YY, _depth);
// Bottom-right
glTexCoord2f(r, b);
glVertex3f(XX, y, _depth);
// Bottom-left
glTexCoord2f(l, b);
glVertex3f(x, y, _depth);
glEnd();
Thank you very much..
Regards,
Maleesh