here’s some code so that you know what I am doing:
I am clearing the backbuffer
SDL_FillRect (screen, 0,0);
Draw a triangle
SDL_LockSurface(screen);
r.FlatTriangle (Vector3(0,0,0), Vector3(100,0,0), Vector3(0,100,0), 0xffffffff);
SDL_UnlockSurface(screen);
Then Flip
SDL_Flip (screen);
The weird thing is that only the first frame gets drawn and then the screen goes black. One thing I noticed is that if I constantly rotate the triangle then I see something flickering but nothing clear. All these on XP if it matters (it shouldn’t).______________________________________________________________________________________
http://mobile.pathfinder.gr - Pathfinder Mobile logos & Ringtones!
http://www.pathfinder.gr - ??? mail ??? ??? Pathfinder!
Hi
Try to use a timer and make sure that u write everything in the screen
surface. 
cu> ----- Original Message -----
From: randomgr@pathfinder.gr (Christos Savvopoulos)
Newsgroups: loki.open-source.sdl
To:
Sent: Friday, May 02, 2003 9:59 PM
Subject: [SDL] clear, draw and flip but nothing appears
here’s some code so that you know what I am doing:
I am clearing the backbuffer
SDL_FillRect (screen, 0,0);
Draw a triangle
SDL_LockSurface(screen);
r.FlatTriangle (Vector3(0,0,0), Vector3(100,0,0), Vector3(0,100,0),
0xffffffff);
SDL_UnlockSurface(screen);
Then Flip
SDL_Flip (screen);
The weird thing is that only the first frame gets drawn and then the screen
goes black. One thing I noticed is that if I constantly rotate the triangle
then I see something flickering but nothing clear. All these on XP if it
matters (it shouldn’t).
http://mobile.pathfinder.gr - Pathfinder Mobile logos & Ringtones!
http://www.pathfinder.gr - ??? mail ??? ??? Pathfinder!
r.FlatTriangle (Vector3(0,0,0), Vector3(100,0,0), );
The weird thing is that only the first frame gets drawn and then > > the screen g=
oes black. One thing I noticed is that if I constantly rotate the t
Hi,
I am not very much experienced SDL programmer and don’t really
understand what r.FlatTriangle means, but try to refill every single
item of all structures (like SDL_Rect) before each drawing. This
should help.
Dynamite Dan, Czech Republic