I’m having a lot of problems loading a bitmap into memory so that it can be used by a program. All the tutorials ive found so far use glaux.lib, which doesnt exist on my mac, and when I tried to use NeHe’s glaux replacement folder, my program had errors up the wazoo with the variable types that the replacement code uses. Specifically, it has errors with the handles to the bitmaps (“HBITMAP” and “BITMAP”), and the command (" hBMP=(HBITMAP)LoadImage(GetModuleHandle(NULL), szFileName, IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_LOADFROMFILE );
"). Any assitance you could give me would be much appreciated.

You are trying to use some Win32 API in an Mac OS program.

If you want to load textures from file in MacOS X, have a look to this page.

Particulary the function:

  • (void) loadBufferFromImageFile: (NSString*) path: (GLubyte *) imagePtr: (GLuint) imageWidth: (GLuint) imageHeight: (GLuint) imageDepth

Thank you very much. I’ve been looking for this for a while now!

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