diff options
author | Brian Paul <[email protected]> | 2010-10-21 19:03:38 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-10-21 19:03:38 -0600 |
commit | be45255ab1f63c10fefcf2f399ac7d1c9294cf6a (patch) | |
tree | e6d81cc269749e8ac9449d757fd883e88cefd80a /src/mesa/vbo/vbo_save_api.c | |
parent | b3de6e703d91da4f7f402f9ca33ccbbe31e97d99 (diff) |
vbo: support for primitive restart
We handle splitting of glDrawArrays() calls into two primitives here
so that drivers don't have to worry about it.
Diffstat (limited to 'src/mesa/vbo/vbo_save_api.c')
-rw-r--r-- | src/mesa/vbo/vbo_save_api.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 8d66e14ab31..19c4b15d5fb 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -896,6 +896,18 @@ static void GLAPIENTRY _save_Begin( GLenum mode ) } +static void GLAPIENTRY _save_PrimitiveRestartNV( void ) +{ + GLenum curPrim; + GET_CURRENT_CONTEXT( ctx ); + + curPrim = ctx->Driver.CurrentSavePrimitive; + + _save_End(); + _save_Begin(curPrim); +} + + /* Unlike the functions above, these are to be hooked into the vtxfmt * maintained in ctx->ListState, active when the list is known or * suspected to be outside any begin/end primitive. @@ -1003,6 +1015,7 @@ static void _save_vtxfmt_init( struct gl_context *ctx ) vfmt->Color4fv = _save_Color4fv; vfmt->EdgeFlag = _save_EdgeFlag; vfmt->End = _save_End; + vfmt->PrimitiveRestartNV = _save_PrimitiveRestartNV; vfmt->FogCoordfEXT = _save_FogCoordfEXT; vfmt->FogCoordfvEXT = _save_FogCoordfvEXT; vfmt->Indexf = _save_Indexf; |