Archived

This topic is now archived and is closed to further replies.

PlumeProg

lesson 6 : too many textures ??

Recommended Posts

Hello I just finished lesson 6 on texture mapping, and as suggested, I tried to modify the code to put my own textures on the cube. Works fine with 1 or 2 texture, but when I try loading more than 2, I get all sorts of errors. Sometimes, I can''t register class, some other time, the app will run but it will get extremely laggy, never displaying anything. What''s wrong ?

Share this post


Link to post
Share on other sites
Did you raise the texture and TextureImage arrays to the amount of textures you are using? If not, then you will get errors.

Share this post


Link to post
Share on other sites
I did.

I ran the prog with debbug and it looks like all the textures are loading correctly. I get to the main loop (with the message pump,dispatch, etc). It''s just that the prog run without ever displaying anything.

I''ve also tried doing the same with nehe code and I get an assertion failed on dbgheap.c

any idea ?

b.t.w. I''m using vc++6 (with the visual c++ code of the lesson)

Share this post


Link to post
Share on other sites
You''ll have to post some of your code for anyone to see the problem. Post your loading section first.

---
Make it work.
Make it fast.

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book

Share this post


Link to post
Share on other sites
Thnaks, but I found my problem : I was using multiple calls to LoadGLTextures (with some modifications) to load multiples textures, but I let the glGenTextures() call in this function.

So I ended creating new texture list every time

very bad...

thanks anyway

Share this post


Link to post
Share on other sites