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

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

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 on other sites
You have no error checking. Anything could be going wrong.

You aren't calling SDL_Init() either.

Share on other sites
? anyways I don't know where the problem lies I'm pretty shore its something I don't know about not what I see :>

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

ok

still no luck ?

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 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 I hate having to do error checking like this when Someone can just say

1. 1
2. 2
frob
16
3. 3
4. 4
5. 5
Rutin
10

• 18
• 13
• 14
• 76
• 22
• Forum Statistics

• Total Topics
632149
• Total Posts
3004363

×