Loading Textures

ylaporte
Unregistered
 
Post: #1
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...
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
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.
Quote this message in a reply
ylaporte
Unregistered
 
Post: #3
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.
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #4
Quote: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). Grin Congrats on the new mac.
Quote this message in a reply
Member
Posts: 328
Joined: 2002.04
Post: #5
I'm Jealous too :-) That is one very nice machine; which model did you go for?
Quote this message in a reply
ylaporte
Unregistered
 
Post: #6
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, ).
Quote this message in a reply
ylaporte
Unregistered
 
Post: #7
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?
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #8
Quote:Originally posted by ylaporte
GEForce 2MX is a bit under powered but still good enough.
Try a RagePro Sad Oh well, I hope to buy a new computer later this summer.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #9
Carlos mentioned something about the QTValuePak download being broken. All I know is that it used to work Wink

You can find it here: http://homepage.mac.com/onesadcookie
Quote this message in a reply
ylaporte
Unregistered
 
Post: #10
Thanks onesadcookie

most helpfull!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Loading and using textures with alpha in OpenGL with Cocoa corporatenewt 4 5,922 Dec 8, 2007 02:06 PM
Last Post: Malarkey
  loading textures - cocoa openGL mDmarco 20 9,274 Aug 28, 2007 08:48 PM
Last Post: OneSadCookie
  Best way to deal with loading textures? bronxbomber92 14 5,286 May 4, 2007 05:31 PM
Last Post: OneSadCookie
  libpng loading junk at bottom of my OpenGL textures...? BinarySpike 6 5,931 Apr 19, 2007 12:20 PM
Last Post: BinarySpike
  Loading textures from bitmaps tehqin 5 3,879 Feb 26, 2007 01:58 AM
Last Post: unknown