- var Textur: TglBitmap;
- procedure TMainForm.FormCreate(Sender: TObject);
- begin
- if not InitOpenGL then
- begin
- MessageBeep(32);
- Halt(100);
- end;
- Application.OnIdle := ApplicationEventsIdle;
- InitGl(MainForm);
- glEnable(GL_TEXTURE_2D);
- Textur:= TglBitmap2D.Create;
- Textur.LoadFromFile('./texture/test.bmp');
- Textur.AddAlphaFromColorKey(0,255,0);
- Textur.GenTexture;
- end;