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

Started by
5 comments, last by rip-off 12 years, 4 months ago
[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;

}
}
}

}
Advertisement
You have no error checking. Anything could be going wrong.

You aren't calling SDL_Init() either.
? anyways I don't know where the problem lies I'm pretty shore its something I don't know about not what I see :>
I don't know where the problem lies[/quote]
That is why you should add error checking
ok
still no luck ? :(
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?
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

This topic is closed to new replies.

Advertisement