im currently putting reflections into my
game engine but am having problems with
the call to glScale in that it doesnt do
anything
I thought that if i rendered a primitive
then called glScale(1,-1,1) and re-rendered
the primitive it would be flipped around
the y plane however i only ever get the one
primitive rendered.
im only using glScale for testing purposes as i intend to have reflective surfaces in
any plane and will therefore transform my
vertices by a matrix before the second pass
however it is a bit strange.
When you do reflections this way, you will have to reverse the backface-frontface culling, because scaling it like this will reverse the facing on all of the polygons.
if Assigned(glDrawArrays) then
begin
glColorPointer(4,GL_FLOAT,0,FColors);
glTexCoordPointer(2,GL_FLOAT,0,FTexCoords);
glVertexPointer(3,GL_FLOAT,0,FVertices);
glDrawArrays(GL_QUADS,0,FQuadCount * 4);
end else begin
glBegin(GL_QUADS);
for I := 0 to (FQuadCount*4)-1 do
begin
glColor4fv(@FColors[i]);
glTexCoord2fv(@FTexCoords[i]);
glVertex3fv(@FVertices[i]);
end;
glEnd;
end;
//this is it!!
FQuadCount := 0;
I was setting quadcount = 0 so in the
next pass it was rendering nothing!!