Commit 4f6b704f authored by Brian Paul's avatar Brian Paul

mesa: move the NullBufferObj from GLcontext to gl_shared_state

Since shared array objects may point to the null/default buffer object,
the null/default buffer object should be part of the shared state.
parent 105c8529
...@@ -112,7 +112,8 @@ init_array(GLcontext *ctx, ...@@ -112,7 +112,8 @@ init_array(GLcontext *ctx,
array->Normalized = GL_FALSE; array->Normalized = GL_FALSE;
#if FEATURE_ARB_vertex_buffer_object #if FEATURE_ARB_vertex_buffer_object
/* Vertex array buffers */ /* Vertex array buffers */
array->BufferObj = ctx->Array.NullBufferObj; _mesa_reference_buffer_object(ctx, &array->BufferObj,
ctx->Shared->NullBufferObj);
#endif #endif
} }
...@@ -180,7 +181,7 @@ _mesa_remove_array_object( GLcontext *ctx, struct gl_array_object *obj ) ...@@ -180,7 +181,7 @@ _mesa_remove_array_object( GLcontext *ctx, struct gl_array_object *obj )
static void static void
unbind_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj ) unbind_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj )
{ {
if (bufObj != ctx->Array.NullBufferObj) { if (bufObj != ctx->Shared->NullBufferObj) {
_mesa_reference_buffer_object(ctx, &bufObj, NULL); _mesa_reference_buffer_object(ctx, &bufObj, NULL);
} }
} }
......
...@@ -424,16 +424,8 @@ _mesa_buffer_unmap( GLcontext *ctx, GLenum target, ...@@ -424,16 +424,8 @@ _mesa_buffer_unmap( GLcontext *ctx, GLenum target,
void void
_mesa_init_buffer_objects( GLcontext *ctx ) _mesa_init_buffer_objects( GLcontext *ctx )
{ {
/* Allocate the default buffer object and set refcount so high that ctx->Array.ArrayBufferObj = ctx->Shared->NullBufferObj;
* it never gets deleted. ctx->Array.ElementArrayBufferObj = ctx->Shared->NullBufferObj;
* XXX with recent/improved refcounting this may not longer be needed.
*/
ctx->Array.NullBufferObj = _mesa_new_buffer_object(ctx, 0, 0);
if (ctx->Array.NullBufferObj)
ctx->Array.NullBufferObj->RefCount = 1000;
ctx->Array.ArrayBufferObj = ctx->Array.NullBufferObj;
ctx->Array.ElementArrayBufferObj = ctx->Array.NullBufferObj;
} }
...@@ -477,7 +469,7 @@ bind_buffer_object(GLcontext *ctx, GLenum target, GLuint buffer) ...@@ -477,7 +469,7 @@ bind_buffer_object(GLcontext *ctx, GLenum target, GLuint buffer)
/* The spec says there's not a buffer object named 0, but we use /* The spec says there's not a buffer object named 0, but we use
* one internally because it simplifies things. * one internally because it simplifies things.
*/ */
newBufObj = ctx->Array.NullBufferObj; newBufObj = ctx->Shared->NullBufferObj;
} }
else { else {
/* non-default buffer object */ /* non-default buffer object */
...@@ -744,7 +736,7 @@ unbind(GLcontext *ctx, ...@@ -744,7 +736,7 @@ unbind(GLcontext *ctx,
struct gl_buffer_object *obj) struct gl_buffer_object *obj)
{ {
if (*ptr == obj) { if (*ptr == obj) {
_mesa_reference_buffer_object(ctx, ptr, ctx->Array.NullBufferObj); _mesa_reference_buffer_object(ctx, ptr, ctx->Shared->NullBufferObj);
} }
} }
......
...@@ -1005,9 +1005,6 @@ _mesa_free_context_data( GLcontext *ctx ) ...@@ -1005,9 +1005,6 @@ _mesa_free_context_data( GLcontext *ctx )
_mesa_free_query_data(ctx); _mesa_free_query_data(ctx);
#endif #endif
#if FEATURE_ARB_vertex_buffer_object
_mesa_delete_buffer_object(ctx, ctx->Array.NullBufferObj);
#endif
_mesa_delete_array_object(ctx, ctx->Array.DefaultArrayObj); _mesa_delete_array_object(ctx, ctx->Array.DefaultArrayObj);
/* free dispatch tables */ /* free dispatch tables */
......
...@@ -1593,7 +1593,6 @@ struct gl_array_attrib ...@@ -1593,7 +1593,6 @@ struct gl_array_attrib
GLbitfield NewState; /**< mask of _NEW_ARRAY_* values */ GLbitfield NewState; /**< mask of _NEW_ARRAY_* values */
#if FEATURE_ARB_vertex_buffer_object #if FEATURE_ARB_vertex_buffer_object
struct gl_buffer_object *NullBufferObj;
struct gl_buffer_object *ArrayBufferObj; struct gl_buffer_object *ArrayBufferObj;
struct gl_buffer_object *ElementArrayBufferObj; struct gl_buffer_object *ElementArrayBufferObj;
#endif #endif
...@@ -2064,6 +2063,8 @@ struct gl_shared_state ...@@ -2064,6 +2063,8 @@ struct gl_shared_state
GLuint TextureStateStamp; /**< state notification for shared tex */ GLuint TextureStateStamp; /**< state notification for shared tex */
/*@}*/ /*@}*/
/** Default buffer object for vertex arrays that aren't in VBOs */
struct gl_buffer_object *NullBufferObj;
/** /**
* \name Vertex/fragment programs * \name Vertex/fragment programs
......
...@@ -170,7 +170,7 @@ _mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values ) ...@@ -170,7 +170,7 @@ _mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values )
return; return;
} }
/* restore */ /* restore */
ctx->DefaultPacking.BufferObj = ctx->Array.NullBufferObj; ctx->DefaultPacking.BufferObj = ctx->Shared->NullBufferObj;
buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
GL_READ_ONLY_ARB, GL_READ_ONLY_ARB,
ctx->Unpack.BufferObj); ctx->Unpack.BufferObj);
...@@ -229,7 +229,7 @@ _mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values ) ...@@ -229,7 +229,7 @@ _mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values )
return; return;
} }
/* restore */ /* restore */
ctx->DefaultPacking.BufferObj = ctx->Array.NullBufferObj; ctx->DefaultPacking.BufferObj = ctx->Shared->NullBufferObj;
buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
GL_READ_ONLY_ARB, GL_READ_ONLY_ARB,
ctx->Unpack.BufferObj); ctx->Unpack.BufferObj);
...@@ -303,7 +303,7 @@ _mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values ) ...@@ -303,7 +303,7 @@ _mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values )
return; return;
} }
/* restore */ /* restore */
ctx->DefaultPacking.BufferObj = ctx->Array.NullBufferObj; ctx->DefaultPacking.BufferObj = ctx->Shared->NullBufferObj;
buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
GL_READ_ONLY_ARB, GL_READ_ONLY_ARB,
ctx->Unpack.BufferObj); ctx->Unpack.BufferObj);
...@@ -371,7 +371,7 @@ _mesa_GetPixelMapfv( GLenum map, GLfloat *values ) ...@@ -371,7 +371,7 @@ _mesa_GetPixelMapfv( GLenum map, GLfloat *values )
return; return;
} }
/* restore */ /* restore */
ctx->DefaultPacking.BufferObj = ctx->Array.NullBufferObj; ctx->DefaultPacking.BufferObj = ctx->Shared->NullBufferObj;
buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
GL_WRITE_ONLY_ARB, GL_WRITE_ONLY_ARB,
ctx->Pack.BufferObj); ctx->Pack.BufferObj);
...@@ -432,7 +432,7 @@ _mesa_GetPixelMapuiv( GLenum map, GLuint *values ) ...@@ -432,7 +432,7 @@ _mesa_GetPixelMapuiv( GLenum map, GLuint *values )
return; return;
} }
/* restore */ /* restore */
ctx->DefaultPacking.BufferObj = ctx->Array.NullBufferObj; ctx->DefaultPacking.BufferObj = ctx->Shared->NullBufferObj;
buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
GL_WRITE_ONLY_ARB, GL_WRITE_ONLY_ARB,
ctx->Pack.BufferObj); ctx->Pack.BufferObj);
...@@ -494,7 +494,7 @@ _mesa_GetPixelMapusv( GLenum map, GLushort *values ) ...@@ -494,7 +494,7 @@ _mesa_GetPixelMapusv( GLenum map, GLushort *values )
return; return;
} }
/* restore */ /* restore */
ctx->DefaultPacking.BufferObj = ctx->Array.NullBufferObj; ctx->DefaultPacking.BufferObj = ctx->Shared->NullBufferObj;
buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
GL_WRITE_ONLY_ARB, GL_WRITE_ONLY_ARB,
ctx->Pack.BufferObj); ctx->Pack.BufferObj);
......
...@@ -245,7 +245,8 @@ _mesa_init_pixelstore( GLcontext *ctx ) ...@@ -245,7 +245,8 @@ _mesa_init_pixelstore( GLcontext *ctx )
ctx->Pack.ClientStorage = GL_FALSE; ctx->Pack.ClientStorage = GL_FALSE;
ctx->Pack.Invert = GL_FALSE; ctx->Pack.Invert = GL_FALSE;
#if FEATURE_EXT_pixel_buffer_object #if FEATURE_EXT_pixel_buffer_object
ctx->Pack.BufferObj = ctx->Array.NullBufferObj; _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj,
ctx->Shared->NullBufferObj);
#endif #endif
ctx->Unpack.Alignment = 4; ctx->Unpack.Alignment = 4;
ctx->Unpack.RowLength = 0; ctx->Unpack.RowLength = 0;
...@@ -258,7 +259,8 @@ _mesa_init_pixelstore( GLcontext *ctx ) ...@@ -258,7 +259,8 @@ _mesa_init_pixelstore( GLcontext *ctx )
ctx->Unpack.ClientStorage = GL_FALSE; ctx->Unpack.ClientStorage = GL_FALSE;
ctx->Unpack.Invert = GL_FALSE; ctx->Unpack.Invert = GL_FALSE;
#if FEATURE_EXT_pixel_buffer_object #if FEATURE_EXT_pixel_buffer_object
ctx->Unpack.BufferObj = ctx->Array.NullBufferObj; _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj,
ctx->Shared->NullBufferObj);
#endif #endif
/* /*
...@@ -278,6 +280,7 @@ _mesa_init_pixelstore( GLcontext *ctx ) ...@@ -278,6 +280,7 @@ _mesa_init_pixelstore( GLcontext *ctx )
ctx->DefaultPacking.ClientStorage = GL_FALSE; ctx->DefaultPacking.ClientStorage = GL_FALSE;
ctx->DefaultPacking.Invert = GL_FALSE; ctx->DefaultPacking.Invert = GL_FALSE;
#if FEATURE_EXT_pixel_buffer_object #if FEATURE_EXT_pixel_buffer_object
ctx->DefaultPacking.BufferObj = ctx->Array.NullBufferObj; _mesa_reference_buffer_object(ctx, &ctx->DefaultPacking.BufferObj,
ctx->Shared->NullBufferObj);
#endif #endif
} }
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "mtypes.h" #include "mtypes.h"
#include "hash.h" #include "hash.h"
#include "arrayobj.h" #include "arrayobj.h"
#include "bufferobj.h"
#include "shared.h" #include "shared.h"
#include "shader/program.h" #include "shader/program.h"
#include "shader/shader_api.h" #include "shader/shader_api.h"
...@@ -92,6 +93,13 @@ _mesa_alloc_shared_state(GLcontext *ctx) ...@@ -92,6 +93,13 @@ _mesa_alloc_shared_state(GLcontext *ctx)
shared->BufferObjects = _mesa_NewHashTable(); shared->BufferObjects = _mesa_NewHashTable();
#endif #endif
/* Allocate the default buffer object and set refcount so high that
* it never gets deleted.
* XXX with recent/improved refcounting this may not longer be needed.
*/
shared->NullBufferObj = _mesa_new_buffer_object(ctx, 0, 0);
shared->NullBufferObj->RefCount = 1000;
shared->ArrayObjects = _mesa_NewHashTable(); shared->ArrayObjects = _mesa_NewHashTable();
/* Create default texture objects */ /* Create default texture objects */
...@@ -341,6 +349,10 @@ _mesa_free_shared_state(GLcontext *ctx, struct gl_shared_state *shared) ...@@ -341,6 +349,10 @@ _mesa_free_shared_state(GLcontext *ctx, struct gl_shared_state *shared)
_mesa_DeleteHashTable(shared->RenderBuffers); _mesa_DeleteHashTable(shared->RenderBuffers);
#endif #endif
#if FEATURE_ARB_vertex_buffer_object
_mesa_delete_buffer_object(ctx, shared->NullBufferObj);
#endif
/* /*
* Free texture objects (after FBOs since some textures might have * Free texture objects (after FBOs since some textures might have
* been bound to FBOs). * been bound to FBOs).
......
...@@ -60,7 +60,7 @@ _swrast_CopyColorTable( GLcontext *ctx, ...@@ -60,7 +60,7 @@ _swrast_CopyColorTable( GLcontext *ctx,
/* save PBO binding */ /* save PBO binding */
bufferSave = ctx->Unpack.BufferObj; bufferSave = ctx->Unpack.BufferObj;
ctx->Unpack.BufferObj = ctx->Array.NullBufferObj; ctx->Unpack.BufferObj = ctx->Shared->NullBufferObj;
_mesa_ColorTable(target, internalformat, width, GL_RGBA, CHAN_TYPE, data); _mesa_ColorTable(target, internalformat, width, GL_RGBA, CHAN_TYPE, data);
...@@ -94,7 +94,7 @@ _swrast_CopyColorSubTable( GLcontext *ctx,GLenum target, GLsizei start, ...@@ -94,7 +94,7 @@ _swrast_CopyColorSubTable( GLcontext *ctx,GLenum target, GLsizei start,
/* save PBO binding */ /* save PBO binding */
bufferSave = ctx->Unpack.BufferObj; bufferSave = ctx->Unpack.BufferObj;
ctx->Unpack.BufferObj = ctx->Array.NullBufferObj; ctx->Unpack.BufferObj = ctx->Shared->NullBufferObj;
_mesa_ColorSubTable(target, start, width, GL_RGBA, CHAN_TYPE, data); _mesa_ColorSubTable(target, start, width, GL_RGBA, CHAN_TYPE, data);
...@@ -126,7 +126,7 @@ _swrast_CopyConvolutionFilter1D(GLcontext *ctx, GLenum target, ...@@ -126,7 +126,7 @@ _swrast_CopyConvolutionFilter1D(GLcontext *ctx, GLenum target,
/* save PBO binding */ /* save PBO binding */
bufferSave = ctx->Unpack.BufferObj; bufferSave = ctx->Unpack.BufferObj;
ctx->Unpack.BufferObj = ctx->Array.NullBufferObj; ctx->Unpack.BufferObj = ctx->Shared->NullBufferObj;
/* store as convolution filter */ /* store as convolution filter */
_mesa_ConvolutionFilter1D(target, internalFormat, width, _mesa_ConvolutionFilter1D(target, internalFormat, width,
...@@ -178,12 +178,12 @@ _swrast_CopyConvolutionFilter2D(GLcontext *ctx, GLenum target, ...@@ -178,12 +178,12 @@ _swrast_CopyConvolutionFilter2D(GLcontext *ctx, GLenum target,
ctx->Unpack.SkipImages = 0; ctx->Unpack.SkipImages = 0;
ctx->Unpack.SwapBytes = GL_FALSE; ctx->Unpack.SwapBytes = GL_FALSE;
ctx->Unpack.LsbFirst = GL_FALSE; ctx->Unpack.LsbFirst = GL_FALSE;
ctx->Unpack.BufferObj = ctx->Array.NullBufferObj; ctx->Unpack.BufferObj = ctx->Shared->NullBufferObj;
ctx->NewState |= _NEW_PACKUNPACK; ctx->NewState |= _NEW_PACKUNPACK;
/* save PBO binding */ /* save PBO binding */
bufferSave = ctx->Unpack.BufferObj; bufferSave = ctx->Unpack.BufferObj;
ctx->Unpack.BufferObj = ctx->Array.NullBufferObj; ctx->Unpack.BufferObj = ctx->Shared->NullBufferObj;
_mesa_ConvolutionFilter2D(target, internalFormat, width, height, _mesa_ConvolutionFilter2D(target, internalFormat, width, height,
GL_RGBA, CHAN_TYPE, rgba); GL_RGBA, CHAN_TYPE, rgba);
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "main/imports.h" #include "main/imports.h"
#include "main/mtypes.h" #include "main/mtypes.h"
#include "main/api_arrayelt.h" #include "main/api_arrayelt.h"
#include "main/bufferobj.h"
#include "math/m_eval.h" #include "math/m_eval.h"
#include "vbo.h" #include "vbo.h"
#include "vbo_context.h" #include "vbo_context.h"
...@@ -81,7 +82,8 @@ static void init_legacy_currval(GLcontext *ctx) ...@@ -81,7 +82,8 @@ static void init_legacy_currval(GLcontext *ctx)
cl->Type = GL_FLOAT; cl->Type = GL_FLOAT;
cl->Format = GL_RGBA; cl->Format = GL_RGBA;
cl->Ptr = (const void *)ctx->Current.Attrib[i]; cl->Ptr = (const void *)ctx->Current.Attrib[i];
cl->BufferObj = ctx->Array.NullBufferObj; _mesa_reference_buffer_object(ctx, &cl->BufferObj,
ctx->Shared->NullBufferObj);
} }
} }
...@@ -106,7 +108,8 @@ static void init_generic_currval(GLcontext *ctx) ...@@ -106,7 +108,8 @@ static void init_generic_currval(GLcontext *ctx)
cl->Stride = 0; cl->Stride = 0;
cl->StrideB = 0; cl->StrideB = 0;
cl->Enabled = 1; cl->Enabled = 1;
cl->BufferObj = ctx->Array.NullBufferObj; _mesa_reference_buffer_object(ctx, &cl->BufferObj,
ctx->Shared->NullBufferObj);
} }
} }
...@@ -150,7 +153,7 @@ static void init_mat_currval(GLcontext *ctx) ...@@ -150,7 +153,7 @@ static void init_mat_currval(GLcontext *ctx)
cl->Stride = 0; cl->Stride = 0;
cl->StrideB = 0; cl->StrideB = 0;
cl->Enabled = 1; cl->Enabled = 1;
cl->BufferObj = ctx->Array.NullBufferObj; cl->BufferObj = ctx->Shared->NullBufferObj;
} }
} }
......
...@@ -671,7 +671,7 @@ void vbo_use_buffer_objects(GLcontext *ctx) ...@@ -671,7 +671,7 @@ void vbo_use_buffer_objects(GLcontext *ctx)
GLsizei size = VBO_VERT_BUFFER_SIZE; GLsizei size = VBO_VERT_BUFFER_SIZE;
/* Make sure this func is only used once */ /* Make sure this func is only used once */
assert(exec->vtx.bufferobj == ctx->Array.NullBufferObj); assert(exec->vtx.bufferobj == ctx->Shared->NullBufferObj);
if (exec->vtx.buffer_map) { if (exec->vtx.buffer_map) {
_mesa_align_free(exec->vtx.buffer_map); _mesa_align_free(exec->vtx.buffer_map);
exec->vtx.buffer_map = NULL; exec->vtx.buffer_map = NULL;
...@@ -697,7 +697,7 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec ) ...@@ -697,7 +697,7 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec )
*/ */
_mesa_reference_buffer_object(ctx, _mesa_reference_buffer_object(ctx,
&exec->vtx.bufferobj, &exec->vtx.bufferobj,
ctx->Array.NullBufferObj); ctx->Shared->NullBufferObj);
ASSERT(!exec->vtx.buffer_map); ASSERT(!exec->vtx.buffer_map);
exec->vtx.buffer_map = (GLfloat *)ALIGN_MALLOC(VBO_VERT_BUFFER_SIZE, 64); exec->vtx.buffer_map = (GLfloat *)ALIGN_MALLOC(VBO_VERT_BUFFER_SIZE, 64);
......
...@@ -161,7 +161,7 @@ void vbo_rebase_prims( GLcontext *ctx, ...@@ -161,7 +161,7 @@ void vbo_rebase_prims( GLcontext *ctx,
GL_ELEMENT_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER,
ib->obj); ib->obj);
tmp_ib.obj = ctx->Array.NullBufferObj; tmp_ib.obj = ctx->Shared->NullBufferObj;
tmp_ib.ptr = tmp_indices; tmp_ib.ptr = tmp_indices;
tmp_ib.count = ib->count; tmp_ib.count = ib->count;
tmp_ib.type = ib->type; tmp_ib.type = ib->type;
......
...@@ -459,7 +459,7 @@ replay_init( struct copy_context *copy ) ...@@ -459,7 +459,7 @@ replay_init( struct copy_context *copy )
dst->Ptr = copy->dstbuf + offset; dst->Ptr = copy->dstbuf + offset;
dst->Enabled = GL_TRUE; dst->Enabled = GL_TRUE;
dst->Normalized = src->Normalized; dst->Normalized = src->Normalized;
dst->BufferObj = ctx->Array.NullBufferObj; dst->BufferObj = ctx->Shared->NullBufferObj;
dst->_MaxElement = copy->dstbuf_size; /* may be less! */ dst->_MaxElement = copy->dstbuf_size; /* may be less! */
offset += copy->varying[i].size; offset += copy->varying[i].size;
...@@ -479,7 +479,7 @@ replay_init( struct copy_context *copy ) ...@@ -479,7 +479,7 @@ replay_init( struct copy_context *copy )
*/ */
copy->dstib.count = 0; /* duplicates dstelt_nr */ copy->dstib.count = 0; /* duplicates dstelt_nr */
copy->dstib.type = GL_UNSIGNED_INT; copy->dstib.type = GL_UNSIGNED_INT;
copy->dstib.obj = ctx->Array.NullBufferObj; copy->dstib.obj = ctx->Shared->NullBufferObj;
copy->dstib.ptr = copy->dstelt; copy->dstib.ptr = copy->dstelt;
} }
......
...@@ -221,7 +221,7 @@ static void split_prims( struct split_context *split) ...@@ -221,7 +221,7 @@ static void split_prims( struct split_context *split)
ib.count = count; ib.count = count;
ib.type = GL_UNSIGNED_INT; ib.type = GL_UNSIGNED_INT;
ib.obj = split->ctx->Array.NullBufferObj; ib.obj = split->ctx->Shared->NullBufferObj;
ib.ptr = elts; ib.ptr = elts;
tmpprim = *prim; tmpprim = *prim;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment