Jump to content
  • Advertisement
Sign in to follow this  
FruitJuice27

SDL and Cocoa

This topic is 4959 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.
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);


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

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
That did it. Thanks.
It worked without Flip in Windows.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!