02-21-2005, 03:57 AM
I'be been trying the SDL gfx functions and think I understand the basics, but have a practical question (code example):
Why is this so freaking slow?
I think the problem lies within the SDL_Flip Video, which refreshes the SDL_Surface, but there must probably be a faster way to update the "screen".
All comments & Help appreciated.
Only been here for a couple of days, but it seems like a great community. Will maybe post some newbie Freebasic-SDL-tutorials in the future, as there seems to be a "gap" there. That could take a while, as i'm only beginner level at SDL.
[/code]
Code:
For Teller = 1 to 250
x1 = rnd * 800 : x2 = rnd * 800
y1 = rnd * 600 : y2 = rnd * 600
r = rnd *10 : g = rnd *10: b = rnd *10
LineRGBA Video, x1, y1, x2, y2, r, g, b, 255
SDL_Flip Video
Next Teller
Why is this so freaking slow?
I think the problem lies within the SDL_Flip Video, which refreshes the SDL_Surface, but there must probably be a faster way to update the "screen".
All comments & Help appreciated.
Only been here for a couple of days, but it seems like a great community. Will maybe post some newbie Freebasic-SDL-tutorials in the future, as there seems to be a "gap" there. That could take a while, as i'm only beginner level at SDL.
[/code]