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.
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.
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.