Hey guys,
I try to set up Billboards in my programm, but it does not work at all.
My "testplane" can be seen, but its not rotating according to the view.
See this image (from side view) for detail.
So this is what I got..
As you can see, I want to use the Billboards as Tree leaves.
The code for the white plane is the following:
glDisable(GL_TEXTURE_2D);
glDisable(GL_LIGHTING);
glUseProgram(0);
glGetFloatv(GL_PROJECTION_MATRIX, @Matrix);
Right:= Vectorize(Matrix[0,0], Matrix[0,1], Matrix[0,2]);
Up:= Vectorize(Matrix[1,0], Matrix[1,1], Matrix[1,2]);
glPushMatrix;
glColor3f(1,1,1);
glBegin(GL_QUADS);
glVertex3f(3 +Right.X+Up.X, 0+Right.Y+Up.Y, 3 +Right.Z+Up.Z);
glVertex3f(-3-Right.X+Up.X, 0-Right.Y+Up.Y, 3 -Right.Z+Up.Z);
glVertex3f(-3-Right.X-Up.X, 0-Right.Y-Up.Y, -3-Right.Z-Up.Z);
glVertex3f(3 +Right.X-Up.X, 0+Right.Y-Up.Y, -3+Right.Z-Up.Z);
glEnd;
glPopMatrix;
glEnable(GL_TEXTURE_2D);
glEnable(GL_LIGHTING);
Can you tell me my mistake?