🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

AUX_RGBImageRec - OS X [Solved]

Started by
1 comment, last by wesw02 16 years, 12 months ago
Hey guys, First of all, thanks alot to the authors of the nehe.gamedev.net tutorials. Currently I'm stuck on lesson 6, from what I have read 'AUX_RGBImageRec' has been deprecated and is no longer in the OpenGL devel kit. I've seen solutions posted in other threads and various places on the internet, however all of these solutions are only for Windows users. I'm using Xcode on my apple. Can someone please point me in the right direction as to how I can get this going on my apple. I downloaded the source for OS X linked on the page, however its completely in cocoa. [Edited by - wesw02 on July 5, 2007 5:26:23 PM]
Advertisement
Simple, don't use it at all.
Download the beta code from the top of this forum thread, then take the image loading class from lesson 05 and adapt that into your code(we made it standalone for just this purpose), it should work on most systems, at least with some minor tinkering.
lc_overlord you rock!!! It took me some time to figure you what was going on, but I got it working correctly. Thanks a lot man.

Here are some quick instructions for those of you who just want to get this going. These instructions assume that you have been following the tutorial from lesson 1, and have completed the changes described in lesson 6. Also please keep in mind I'm programing on a Mac in Xcode.

1) Download the beta code here. (More details about this code are here)

2) Unzip. Copy the following files to your project folder.
nehebeta/lesson05/neheTGATexture.cpp
nehebeta/lesson05/neheTGATexture.h
nehebeta/lesson05/bin/nehe.tga

3) Add the following to the top of your main.cpp
#include "neheTGATexture.h"

4) Include or Import the "neheTGATexture.cpp" file to your project so that it is compiled.

5) You can completely remove both of the following functions:
"LoadGLTextures()"
"LoadBMP(char *Filename)"

6) In your main.cpp replace make the following replacements:

Replace: "GLuint texture[1];"[found just below preprocessor directives]
With: "imageTGA texture;"

Replace: "if (!LoadGLTextures());{ return FALSE; }" [found in InitGL()]
With: "if (!texture.loadTGA("../nehe.tga")); { return FALSE; }"
You may need to change "../nehe.tga" to reflect its relative location to your build.

Replace: "glBindTexture(GL_TEXTURE_2D, texture[0]);" [found in DrawGLScene()]
With: "glBindTexture(GL_TEXTURE_2D, texture.getId());"

7) This step may or may not apply to you, I recommend you try without it, if it doesn't work add it. Add the following line of code to the very bottom of the "DrawGLScene" function:
"glutSwapBuffers();"



Thanks a lot to the BBB for posting this code, and all the rest of the guys that put together these great tutorials.

This topic is closed to new replies.

Advertisement