Original Post
When I run this code in VC++6 it displays the bitmap in a window. However when I run the same code in XCode (cocoa), the window is black, the bitmap is not shown. I have spent some time debugging this and i assure you that the surfaces are not NULL. A check of the variable result shows success (0). I know that I have the right working directory since when I change the name of the bitmap, my result is negative for the blit. I have even tried it with a software surface. Does anyone have any ideas? Thanks Fruit
pSurface = SDL_SetVideoMode (640,500,16,SDL_HWSURFACE);
pBuffer = SDL_CreateRGBSurface (SDL_HWSURFACE,640,500,16,0,0,0,0);
pBuffer = SDL_LoadBMP("test.bmp");
int result = SDL_BlitSurface(pBuffer,NULL,pSurface,NULL);