[SDL] Segmentation fault.... again

Daniel zombie_1985 at hotmail.com
Sun Jan 23 12:04:02 PST 2005


On Fri, 7 Jan 2005 13:59:33 +0100, Johannes Schmidt <sdl at myrealbox.com> wrote:
> Huh?
> Sorry, I have to ask:
> Are you really sure that it is glClear that takes this long?
> glClear just fills the buffers with 0's or the given clear color.
> 
> Every software renderer does a better job on this.

I suspected it should as well, but I don't know how else to explain
it.  I don't have the code right in front of me, but it looks
something like this:

CStopWatch clearWatch;
clearWatch.reset();
clearWatch.start();

COutput::Clear();    // this function just calls glClear() with color
and depth bits

clearWatch.stop();
printf("display cleared in %d ms\n", clearWatch.getTime());

And when I look in stdout.txt after running this from my P2 550
running Win98, I see a bunch of lines that look like this:

display cleared in 278 ms
display cleared in 266 ms

etc. etc.

It might be completely far-fetched, but is it possible that because
I'm double buffering, all of my rendering calls are just being cached
instead of actually executed, and the rendering itself isn't happening
until the next frame is being cleared?

I hope that makes sense to somebody other than me, and I hope I'm way
wrong, heh.

Thanks all for your help,
Steve




More information about the SDL mailing list