PDA

View Full Version : Texture lockup problem...



dorkremi
11-27-2000, 11:19 AM
Well, no one responded to my first question... so maybe it was as stupid as I thought.

Here's my second one:
When loading data from a file, I am only able to open three sgi files (~17KB each) for texture mapping using tk.lib (texture = tk_RGBImageLoad("myfile.sgi"). I think... I'm not at the computer this second, so the function name might be slightly off.) before my computer locks up. I even free the memory used for the bitmaps using the free(texture->data) command... (after they're mapped)

What could be causing my computer to lock up when I try to open more than three sgi textures? Would MaxApplZone() help to give me more memory? Any help is greatly appreciated...

NOTE: I'm using AGL and a standard mac window, not GLUT.

Thanks.
-Josh Morris
dorkremi@hotmail.com

[This message has been edited by dorkremi (edited 11-27-2000).]

WaVe
12-07-2000, 03:21 AM
How much memory memory do oyu have allocated to your application.
Check the numberwith Get Info under the FIle menu.

Theo
12-10-2000, 09:18 AM
Apple has a big fat bug in the tk lib.

DONT USE IT.

Just convert the files to PNG with graphics converter and use that instead. It caused me many lost hours too trying to debug my damn program.

dorkremi
12-10-2000, 04:40 PM
OK. Well, I guessed there was a bug... and I know what a PNG file is... unfortunately, I _dont_ know how to read one in to texture-map a polygon..

what exactly would I do to do that?

-Josh M.
dorkremi@hotmail.com

DJ Tricky S
12-10-2000, 07:57 PM
If you want to save alot of effort and are coding primarily for MacOS only (ie, cross-platform compatible code is not on the top of your list of things to do), I would suggest using QuickTime to handle all of your graphics file I/O. You can find examples of using QuickTime to load graphics files and make OpenGL textures from them on Apple's Developer website, http://www.apple.com/developer/

Magnus W
12-11-2000, 01:58 PM
Theo> I have been looking for a PNG reader the last week. A friend of mine wrote one for linux, but it uses a GNU library which I would have to compile for mac (don't have the skills to port that...)
Do you have one?

12-12-2000, 06:24 AM
Try this GLPNG sample code: http://www.wyatt100.freeserve.co.uk/download.htm

or use Quicktime to load an image into a Gworld, and then switch the pixels from argb to rgba or something.