PDA

View Full Version : Loading texture during runtime



iNsaNEiVaN
03-26-2002, 12:31 PM
If I ever try calling my texture loading function in DrawScene() instead of in InitGL(), it doesn't load. Whats up?

john
03-26-2002, 03:18 PM
Hello,

rename your function DrawScene() to DrawSceneLoadTextureNOW(). That should fix the problem.

seriously, its impossible to tell you what you are doing wrong from your description. Maybe initgl() is called, and drawscene is not? maybe you're calling initgl all the time, thereby trashing any texture you may have loaded in drawscene()?

follow the execution path of your code and put in trace writes when you pass the bitmap data to the GL state. Make sure what you THINK your program is doing is exactly what your program is doing.

cheers,
JOhn