No More than one use of the same texture on a model.. wtf?

Started by
3 comments, last by Ev 22 years, 2 months ago
A while back I did some md2 code to load md2s into my own engine, but for like the last 5 months, One thing has bugged me, I cant use the same skin twice... Ok, So I''ll intiialize two models and toss em into the world. One loads the skin but the other doesnt. In my log files it says that the skin couldnt be loaded the second time.... WTF?! (Im using tgas btw) Has anyone ever encountered this kinda error where the same .tga could not be used twice? (Its in OPENGL using C++6) Any help would be appreciated, -Ev
Hi, My Names Ev, And I suck at debugging... - The first step is admitting.
Advertisement
you can use different textures for one model, there is absolutely no problem with that.
so the fault is in your code, not in opengl or something like that.
The onl;y thing I can think of is that you might not be closing the TGA file at the end of the first read. If that''s the case then the second time you try to open the file it could fail (depending on the access mode and sharing options you specify).
Iain HutchisonProgrammer, Silicon DreamsThe views expressed here are my own, not those of my employer.
Alright, Looks Like I mighta made a mistake then, Ill go thru my code and look.... Thanks for the help guys, (kinda relieved in a way)
Hi, My Names Ev, And I suck at debugging... - The first step is admitting.
Do you really WANT to load the skin twice. You already have it in memory,... just use that one.....

Just a thought, it still leaves you with a weird file i/o error.

----------------------------
"Quotes are cool" - Me

Check out my game Asteroidz, it rules !!!
--------<a href="http://www.icarusindie.com/rpc>Reverse Pop Culture

This topic is closed to new replies.

Advertisement