Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > OpenGL & textures

OpenGL & textures
Thread Tools
Mac Elite
Join Date: Sep 2000
Status: Offline
Reply With Quote
Dec 13, 2001, 06:12 AM
 
Okay, I'm a real newbie to the whole OpenGL thing; so, go easy on me.

I'm reading and going through the tutorials at NeHe. So far I'm learning a great deal and am progressing through the tutorials rather nicely. Each tutorial's code can be downloaded so you don't have to retype all the code. The only thing you need to do is add the OpenGL framework to the project and then you're ready to compile. Well, starting with lesson 6, the downloadable tutorials that use texture mapping cause problems with Project Builder. Here's the kicker: I can build the app and then run it from the Finder okay; however, I can't build-and-run it from Project Builder. If I do that, Project Builder says:

<font color = red>Lesson 6.app has exited due to signal 11 (SIGSEGV).</font>

What's a SIGSEGV error?

Now, the code included with the project I downloaded has a .c and .h file for loading SGI files. The same thing happens with the other projects that use textures (and also have these two files). Before I take those out and start trying to use the code for BMPs that is on the tutorial webpage, I was wondering if there is something in these two files that could be fixed to alleviate this problem. If someone could be so kind as to download that code and see if you notice anything out of the ordinary, I would be very grateful.

Thanks in advance!

[ 12-13-2001: Message edited by: starfleetX ]
The server made a boo boo. (403)
     
Dedicated MacNNer
Join Date: Apr 2001
Location: Bethesda, MD
Status: Offline
Reply With Quote
Dec 13, 2001, 09:22 AM
 
It's choking when trying to read the image. As it turns out, it looks like the image file is messed up. When I substituted another image, the program worked fine. Interestingly enough, Graphic Converter read the image fine, but the code in the program didn't like it.

You can get the image I used here. It's the standard SGI cafe texture map. Rename it to image.rgb and the program should work.

SIGSEGV is what's know as a seg fault. A pointer overran allowable memory, causing it to crash. You should learn to use the Project Builder debugger (which is just a front end for GNU's gdb debugger). gdb is your friend.

BTW, the Apple Developer Tools includes a whole bunch of GLUT demoes in /Developer/Examples/GLUTExamples. I like the "ideas" ine, since it's an old SGI demo.

dave
     
Mac Elite
Join Date: Sep 2000
Status: Offline
Reply With Quote
Dec 14, 2001, 01:11 AM
 
Thanks for your response.

I was still having trouble with other RGB files I was creating, though, until I realized that GraphicConverter defaults to using "RGB RLE". Apparently the provided code doesn't like RLE compression. So, after some testing I found that saving as "RGB Verbatim" makes the images work fine.
The server made a boo boo. (403)
     
Mac Enthusiast
Join Date: Apr 2001
Status: Offline
Reply With Quote
Dec 14, 2001, 03:14 AM
 
gdb is your friend

LOL tell me about it : )
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:04 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2