Hmm, I've managed to sort of fix the problem. But now I have a new problem... The image is, how to put it, not garbled but..... well. check the attachment Its better but not really practical.
To compare result is what the program looks like and Picture.png is what it should look like... Any ideas as to what I'm doing wrong? Here's my render code:
Code:
procedure Image.Draw(X,Y: Int64);
var
VxR: array [1..2] of LongInt;
VyR: array [1..2] of LongInt;
PxR: array [1..2] of Int64;
PyR: array [1..2] of Int64;
begin
VxR[1] := 0;
VxR[2] := Surface.W;
VyR[1] := 0;
VyR[2] := Surface.H;
PxR[1] := X;
PxR[2] := X + Surface.W;
PyR[1] := Y;
PyR[2] := Y + Surface.H;
glBindTexture( GL_TEXTURE_2D, texture );
glBegin( GL_QUADS );
glTexCoord2i( VxR[1], VyR[2] );
glVertex3f( PxR[1], PyR[2], 0. );
glTexCoord2i( VxR[2], VyR[2] );
glVertex3f( PxR[2], PyR[2], 0. );
glTexCoord2i( VxR[2], VyR[1] );
glVertex3f( PxR[2], PyR[1], 0. );
glTexCoord2i( VxR[1], VyR[1] );
glVertex3f( PxR[1], PyR[1], 0. );
glEnd();
end;
Note that these images were originally PNG before PGD converted them to jpg....
Edit: Almost forgot to mention: I am expecting it to go off the edge of the screen... I have a different scale procedure.
Bookmarks