PDA

View Full Version : Loading Textures


ylaporte
2002.05.02, 01:22 PM
I know there used to be a lot of sample code about how to load image files using Quicktime to make textures ou of them. But now it is nowhere to be found. There is an example by Apple but it is far too large for what I want and since I don't know much about quicktime it is sort of difficult to sort it out.

I tried to use libjpeg to load textures but I get a SIGILL (4) on reading the headers from a jpg file. I do have a homemade TIFF reader but it only works for grayscale images for now and I dont have time right now to code (and above all test) the color loading part.

Besides using quicktime for this sort of stuff seems like the best thing to do.

Anyone care to post (or repost) some code or just where to find it? Just something to get me started on texture loading...

OneSadCookie
2002.05.02, 04:44 PM
There is sample code on iDevGames called QTValuePak which demonstrates using QuickTime to load images as textures.

I finished a libjpeg texture loader a couple of days ago too, if you want to see the source.

ylaporte
2002.05.02, 09:12 PM
AH... QTValuePack it is then... I knew there was something like that, just didn't remember the name. Thanks a lot!

As for code for libjpeg, as I said, the problem occurs at a weird moment and I don't really see what could have went wrong. I am pretty sure I can figure it out by myself, it will give me a little debugger practice. Just didn't have time today, I finally received my iMac G4 (well I have to go get it tomorrow morning but I still have to clean up the iMac DV I borrowed from a friend)... one month after I ordered it.

Josh
2002.05.03, 09:13 AM
Originally posted by ylaporte
I finally received my iMac G4 (well I have to go get it tomorrow morning but I still have to clean up the iMac DV I borrowed from a friend)... one month after I ordered it. Now we're all jealous (or I am, at least). :D Congrats on the new mac.

DaFalcon
2002.05.03, 10:46 AM
I'm Jealous too :-) That is one very nice machine; which model did you go for?

ylaporte
2002.05.04, 12:56 PM
Well.. it is the first mac I buy...
And it does seem like a nice machine so far.
GEForce 2MX is a bit under powered but still good enough.

I did get a good framerate increase on most of my projects (from 21 FPS to 31, ).

ylaporte
2002.05.04, 01:13 PM
I just tried to download QTValuePack but didn't succeed, I get an error like it isn't on the server.

I beleive it is ot the only source code package that is no longer available, I tried to download another one and had the same result.

Can someone post it again or can the source code downlod section be fixed?

Josh
2002.05.04, 03:45 PM
Originally posted by ylaporte
GEForce 2MX is a bit under powered but still good enough.
Try a RagePro :( Oh well, I hope to buy a new computer later this summer.

OneSadCookie
2002.05.05, 04:21 PM
Carlos mentioned something about the QTValuePak download being broken. All I know is that it used to work ;)

You can find it here: http://homepage.mac.com/onesadcookie

ylaporte
2002.05.05, 11:13 PM
Thanks onesadcookie

most helpfull!