1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42:
| unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls,textures, StdCtrls, Buttons, dglopengl;
type TForm1 = class(TForm) BitBtn1: TBitBtn; procedure FormCreate(Sender: TObject); private public end;
var Form1: TForm1; MyTex : glUInt;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject); begin LoadTexture('C:\Borland\Neuer Ordner\textures\bean1\bean0000.tga', MyTex, False); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, MyTex); glEnable(GL_ALPHA_TEST); glAlphaFunc(GL_GREATER, 0.1); glBegin(GL_QUADS); glTexCoord2f(0,0); glVertex3f(-100/2, -100/2,0); glTexCoord2f(1,0); glVertex3f(+100/2, -100/2, -0); glTexCoord2f(1,1); glVertex3f(+100/2, +100/2, -0); glTexCoord2f(0,1); glVertex3f(-100/2, +100/2, -0); glEnd; end;
end. |