Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Mo Jun 03, 2024 23:20

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 2 Beiträge ] 
Autor Nachricht
BeitragVerfasst: Sa Feb 10, 2007 21:16 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jan 24, 2007 00:44
Beiträge: 144
Is it relatively simple for me to convert a TBitmap to a GLUInt that can then be used as an OpenGL texture?

I am OK with loading a BMP or JPG from either a file or a resource using LoadTexture and then glBindTexture. How would I go about the same, say, if my TBitmap was created at runtime?

I saw NeHe's lesson 06, using auxDIBImageLoad - using GLAux I think? - anyway... it would be good to be able to do this.

_________________
Cheers, DpM
http://www.hmusiccentre.org.uk


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: So Feb 11, 2007 09:27 
Offline
DGL Member

Registriert: Do Mai 30, 2002 18:48
Beiträge: 1617
Being deprecated, you should avoid glAux. Instead the right functions to chose are gluBuild2DMipmaps for mipmapping or glTexImage for simpler textures (or if you are in need to build your mipmaps on your own). Have a look in their corresponding documentation for usage details.
You will need to get the scanline data of your bitmap if it is actually stored as a TBitMap. As far as I remember you will need its Scan0 property and you are done but I'm not sure - haven't used delphi for a while.


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 2 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 8 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.027s | 17 Queries | GZIP : On ]