PDA

View Full Version : flushvertices - help!



hiredgun
12-13-2006, 04:41 AM
I'm using a radeon driver on a linux machine and programming with Mesa, and i'm trying to understand when FlushVertices is called. Specifically, when will the second if statement be true? take a look at the code below:

void FlushVertices( GLcontext *ctx, GLuint new_state )
{
if( ctx ){
if( ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES ){
radeonFlushVertices( ctx, FLUSH_STORED_VERTICES );
}
ctx->NewState |= new_state;
}
}

Thanks

ZbuffeR
12-13-2006, 08:25 AM
If context is initialized (not a null pointer), and if Driver.NeedFlush bit of said context is set.

hiredgun
12-18-2006, 10:25 AM
well yeah. When does a needflush bit get set generally? what constitutes needing a flush?