Jump to content
  • Advertisement
Sign in to follow this  
DominicHughes

rotozoomSurface not showing on framebuffer? for some reason even tho I flipped the screen?

This topic is 2494 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

[font="Courier New"]Hello can someone tell me if there is anything wrong with my code and also can tell me what is causing this problem?


The problem Is why Is Image not being displayed on the framebuffer at all it just shows a black screen on the framebuffer any tips would be helpfull thanks.

here is my code[/font]

#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include "SDL_rotozoom.h"


int main(int argc, char *argv[])

{
bool done = false;
SDL_Surface *Screen = NULL;
SDL_Surface *Image = NULL;

Screen = SDL_SetVideoMode(640,480,32,SDL_HWSURFACE);
Image = IMG_Load("image.png");

SDL_Surface *Imagerotated = rotozoomSurface(Image,90,1,0);

SDL_BlitSurface(imagerotated,NULL,Screen,NULL);

SDL_Flip(Screen);

SDL_Event event;

while(!done)
{
while(SDL_PollEvent(&event))
{
switch(event.type)
{
case SDL_QUIT:

return 0;

break;

}
}
}

}

Share this post


Link to post
Share on other sites
Advertisement
I don't know where the problem lies[/quote]
That is why you should add error checking

Share this post


Link to post
Share on other sites
What does your code look like now, with the error checking and handling in it? In particular, do you record or display the strings returned by SDL_GetError() in the event of an error?

Share this post


Link to post
Share on other sites
Hidden
you want me to be totally honest I don't really know how to do SDL_GetError() error checking Iv only needed in in some cases I didn't think it would be needed since you guys know it all and I was hoping one of you could just tell me what I'm doing wrong So I didn't have to do all this :D I hate having to do error checking like this when Someone can just say

Share this post


Link to post
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!