Bitmap Ortho vetületben

Top  Previous  Next

A TALOpenGL komponens felhasználásával.

 

 

img0

 

Var Tex: Cardinal;

 

procedure TForm1.ALGInitGL(Sender: TObject);

begin

Tex:=alg.CreateTexture('Texture.jpg');

end;

 

procedure TForm1.ALGPaint(Sender: TObject);

begin

glPushMatrix;

  glColor3f(1,1,1);

  glrotatef(-30,0,0,1);

 

GlBindtexture(GL_TEXTURE_2D,Tex);

glBegin (GL_QUADS);

  glTexCoord2d(0.0,0.0);  glVertex3f(-1,1,0);

  glTexCoord2d(0.0,1.0);  glVertex3f(1,1,0);

  glTexCoord2d(1.0,1.0);  glVertex3f(1,-2,0);

  glTexCoord2d(1.0,0.0);  glVertex3f(-1,-2,0);

glEnd;

glPopMatrix;

 

glrotatef(0,0,0,1);

glRectd(2,2,1,1);

end;