Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 Jan 2000
Offline Last Active Oct 01 2013 12:15 PM

Posts I've Made

In Topic: open window from opengl app

30 September 2013 - 11:35 AM

I don't know why the code sample from the SDL wiki crashes, but the following article may help you:


Creating an OpenGL Context in SDL 2


In Topic: SDL + XCode ... not linking?

14 January 2013 - 12:51 PM

It sounds like you're trying to have the SDL framework copied into your game's application bundle when you build the project, but the framework isn't being copied. Since you don't have the SDL framework installed on your system, the game doesn't work because there's no SDL framework on the system. You can check to see if the SDL framework is in your game's application bundle by selecting the game in the Finder, right-clicking, and choosing Show Package Contents. The SDL framework should be under Contents > Frameworks in the application bundle.


If the SDL framework isn't in the application, you have to tell Xcode to copy it. Instructions for doing this are in the following article:


Using SDL with Xcode 4


Read the comment from Adam on Feb. 2, 2012 in the article. He has a workaround if the SDL framework isn't being copied to the application bundle.

In Topic: Problem Loading PNGs with SDL_image on Windows

11 July 2012 - 12:26 PM

I found the cause of the release version crashing. After creating the OpenGL texture, I freed the memory of the SDL surface where I loaded the image file. Freeing the memory caused the crash.

Thanks for the help, everyone.

In Topic: Problem Loading PNGs with SDL_image on Windows

09 July 2012 - 03:10 PM

I was able to load the files when running the game inside Visual Studio. Inside the project folder are three folders: Debug, Release, and the name of the project. Inside Visual Studio the working directory was the folder that matched the project name. Moving the PNGs and DLLs into the folder matching the name of the project allowed me to load the PNGs when debugging in Visual Studio.

I moved on to getting the release versions to work. I passed the full path to the PNG files in my code. The program crashed when I launched from Windows Explorer. When I stepped through the code in Visual Studio's debugger, the first two PNG files loaded, but the third one didn't.

I do not have any non-English characters in my path.

When I use fopen, I pass the name of the file. fopen returns a pointer whose address points to NULL when I pass the full path to the file as the filename.

In Topic: Problem Loading PNGs with SDL_image on Windows

09 July 2012 - 01:04 PM

I run the release build from Windows Explorer. I also debug the debug build from Visual Studio. In both cases I place the PNGs and DLLs in the same directory as the executable. In both cases the PNG files do not load.