Texture lockup problem

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).]

How much memory memory do oyu have allocated to your application.
Check the numberwith Get Info under the FIle menu.

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.

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

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/

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?

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.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.