static void _save_vtxfmt_init(struct gl_context *ctx) { struct vbo_save_context *save = &vbo_context(ctx)->save; GLvertexformat *vfmt = &save->vtxfmt; _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); vfmt->Begin = _save_Begin; vfmt->Color3f = _save_Color3f; vfmt->Color3fv = _save_Color3fv; vfmt->Color4f = _save_Color4f; vfmt->Color4fv = _save_Color4fv; vfmt->EdgeFlag = _save_EdgeFlag; vfmt->End = _save_End; vfmt->FogCoordfEXT = _save_FogCoordfEXT; vfmt->FogCoordfvEXT = _save_FogCoordfvEXT; vfmt->Indexf = _save_Indexf; vfmt->Indexfv = _save_Indexfv; vfmt->Materialfv = _save_Materialfv; vfmt->Normal3f = _save_Normal3f; vfmt->Normal3fv = _save_Normal3fv; vfmt->TexCoord1f = _save_TexCoord1f; vfmt->TexCoord1fv = _save_TexCoord1fv; vfmt->TexCoord2f = _save_TexCoord2f; vfmt->TexCoord2fv = _save_TexCoord2fv; vfmt->TexCoord3f = _save_TexCoord3f; vfmt->TexCoord3fv = _save_TexCoord3fv; vfmt->TexCoord4f = _save_TexCoord4f; vfmt->TexCoord4fv = _save_TexCoord4fv; vfmt->Vertex2f = _save_Vertex2f; vfmt->Vertex2fv = _save_Vertex2fv; vfmt->Vertex3f = _save_Vertex3f; vfmt->Vertex3fv = _save_Vertex3fv; vfmt->Vertex4f = _save_Vertex4f; vfmt->Vertex4fv = _save_Vertex4fv; vfmt->VertexAttrib1fNV = _save_VertexAttrib1fNV; vfmt->VertexAttrib1fvNV = _save_VertexAttrib1fvNV; vfmt->VertexAttrib2fNV = _save_VertexAttrib2fNV; vfmt->VertexAttrib2fvNV = _save_VertexAttrib2fvNV; vfmt->VertexAttrib3fNV = _save_VertexAttrib3fNV; vfmt->VertexAttrib3fvNV = _save_VertexAttrib3fvNV; vfmt->VertexAttrib4fNV = _save_VertexAttrib4fNV; vfmt->VertexAttrib4fvNV = _save_VertexAttrib4fvNV; /* This will all require us to fallback to saving the list as opcodes: */ _MESA_INIT_DLIST_VTXFMT(vfmt, _save_); /* inside begin/end */ _MESA_INIT_EVAL_VTXFMT(vfmt, _save_); /* These calls all generate GL_INVALID_OPERATION since this vtxfmt is * only used when we're inside a glBegin/End pair. */ vfmt->Begin = _save_Begin; vfmt->Rectf = _save_Rectf; vfmt->DrawArrays = _save_DrawArrays; vfmt->DrawElements = _save_DrawElements; }
static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec ) { GLvertexformat *vfmt = &exec->vtxfmt; _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); vfmt->Begin = vbo_exec_Begin; vfmt->End = vbo_exec_End; _MESA_INIT_DLIST_VTXFMT(vfmt, _mesa_); _MESA_INIT_EVAL_VTXFMT(vfmt, vbo_exec_); vfmt->Rectf = vbo_exec_Rectf; /* from attrib_tmp.h: */ vfmt->Color3f = vbo_Color3f; vfmt->Color3fv = vbo_Color3fv; vfmt->Color4f = vbo_Color4f; vfmt->Color4fv = vbo_Color4fv; vfmt->FogCoordfEXT = vbo_FogCoordfEXT; vfmt->FogCoordfvEXT = vbo_FogCoordfvEXT; vfmt->Normal3f = vbo_Normal3f; vfmt->Normal3fv = vbo_Normal3fv; vfmt->SecondaryColor3fEXT = vbo_SecondaryColor3fEXT; vfmt->SecondaryColor3fvEXT = vbo_SecondaryColor3fvEXT; vfmt->TexCoord1f = vbo_TexCoord1f; vfmt->TexCoord1fv = vbo_TexCoord1fv; vfmt->TexCoord2f = vbo_TexCoord2f; vfmt->TexCoord2fv = vbo_TexCoord2fv; vfmt->TexCoord3f = vbo_TexCoord3f; vfmt->TexCoord3fv = vbo_TexCoord3fv; vfmt->TexCoord4f = vbo_TexCoord4f; vfmt->TexCoord4fv = vbo_TexCoord4fv; vfmt->Vertex2f = vbo_Vertex2f; vfmt->Vertex2fv = vbo_Vertex2fv; vfmt->Vertex3f = vbo_Vertex3f; vfmt->Vertex3fv = vbo_Vertex3fv; vfmt->Vertex4f = vbo_Vertex4f; vfmt->Vertex4fv = vbo_Vertex4fv; vfmt->VertexAttrib1fNV = vbo_VertexAttrib1fNV; vfmt->VertexAttrib1fvNV = vbo_VertexAttrib1fvNV; vfmt->VertexAttrib2fNV = vbo_VertexAttrib2fNV; vfmt->VertexAttrib2fvNV = vbo_VertexAttrib2fvNV; vfmt->VertexAttrib3fNV = vbo_VertexAttrib3fNV; vfmt->VertexAttrib3fvNV = vbo_VertexAttrib3fvNV; vfmt->VertexAttrib4fNV = vbo_VertexAttrib4fNV; vfmt->VertexAttrib4fvNV = vbo_VertexAttrib4fvNV; vfmt->Materialfv = vbo_Materialfv; vfmt->EdgeFlag = vbo_EdgeFlag; vfmt->Indexf = vbo_Indexf; vfmt->Indexfv = vbo_Indexfv; }
/** * Build a vertexformat of functions that are no-ops. * These are used in out-of-memory situations when we have no VBO * to put the vertex data into. */ void _mesa_noop_vtxfmt_init(GLvertexformat * vfmt) { _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); vfmt->Begin = _mesa_noop_Begin; _MESA_INIT_DLIST_VTXFMT(vfmt, _mesa_); vfmt->Color3f = _mesa_noop_Color3f; vfmt->Color3fv = _mesa_noop_Color3fv; vfmt->Color4f = _mesa_noop_Color4f; vfmt->Color4fv = _mesa_noop_Color4fv; vfmt->EdgeFlag = _mesa_noop_EdgeFlag; vfmt->End = _mesa_noop_End; _MESA_INIT_EVAL_VTXFMT(vfmt, _mesa_noop_); vfmt->FogCoordfEXT = _mesa_noop_FogCoordfEXT; vfmt->FogCoordfvEXT = _mesa_noop_FogCoordfvEXT; vfmt->Indexf = _mesa_noop_Indexf; vfmt->Indexfv = _mesa_noop_Indexfv; vfmt->Materialfv = _mesa_noop_Materialfv; vfmt->Normal3f = _mesa_noop_Normal3f; vfmt->Normal3fv = _mesa_noop_Normal3fv; vfmt->TexCoord1f = _mesa_noop_TexCoord1f; vfmt->TexCoord1fv = _mesa_noop_TexCoord1fv; vfmt->TexCoord2f = _mesa_noop_TexCoord2f; vfmt->TexCoord2fv = _mesa_noop_TexCoord2fv; vfmt->TexCoord3f = _mesa_noop_TexCoord3f; vfmt->TexCoord3fv = _mesa_noop_TexCoord3fv; vfmt->TexCoord4f = _mesa_noop_TexCoord4f; vfmt->TexCoord4fv = _mesa_noop_TexCoord4fv; vfmt->Vertex2f = _mesa_noop_Vertex2f; vfmt->Vertex2fv = _mesa_noop_Vertex2fv; vfmt->Vertex3f = _mesa_noop_Vertex3f; vfmt->Vertex3fv = _mesa_noop_Vertex3fv; vfmt->Vertex4f = _mesa_noop_Vertex4f; vfmt->Vertex4fv = _mesa_noop_Vertex4fv; vfmt->VertexAttrib1fNV = _mesa_noop_VertexAttrib1fNV; vfmt->VertexAttrib1fvNV = _mesa_noop_VertexAttrib1fvNV; vfmt->VertexAttrib2fNV = _mesa_noop_VertexAttrib2fNV; vfmt->VertexAttrib2fvNV = _mesa_noop_VertexAttrib2fvNV; vfmt->VertexAttrib3fNV = _mesa_noop_VertexAttrib3fNV; vfmt->VertexAttrib3fvNV = _mesa_noop_VertexAttrib3fvNV; vfmt->VertexAttrib4fNV = _mesa_noop_VertexAttrib4fNV; vfmt->VertexAttrib4fvNV = _mesa_noop_VertexAttrib4fvNV; vfmt->Rectf = _mesa_noop_Rectf; vfmt->DrawArrays = _mesa_noop_DrawArrays; vfmt->DrawElements = _mesa_noop_DrawElements; }
static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec ) { GLvertexformat *vfmt = &exec->vtxfmt; _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); vfmt->Begin = vbo_exec_Begin; vfmt->End = vbo_exec_End; vfmt->PrimitiveRestartNV = vbo_exec_PrimitiveRestartNV; _MESA_INIT_DLIST_VTXFMT(vfmt, _mesa_); _MESA_INIT_EVAL_VTXFMT(vfmt, vbo_exec_); vfmt->Rectf = vbo_exec_Rectf; /* from attrib_tmp.h: */ vfmt->Color3f = vbo_Color3f; vfmt->Color3fv = vbo_Color3fv; vfmt->Color4f = vbo_Color4f; vfmt->Color4fv = vbo_Color4fv; vfmt->FogCoordfEXT = vbo_FogCoordfEXT; vfmt->FogCoordfvEXT = vbo_FogCoordfvEXT; vfmt->MultiTexCoord1fARB = vbo_MultiTexCoord1f; vfmt->MultiTexCoord1fvARB = vbo_MultiTexCoord1fv; vfmt->MultiTexCoord2fARB = vbo_MultiTexCoord2f; vfmt->MultiTexCoord2fvARB = vbo_MultiTexCoord2fv; vfmt->MultiTexCoord3fARB = vbo_MultiTexCoord3f; vfmt->MultiTexCoord3fvARB = vbo_MultiTexCoord3fv; vfmt->MultiTexCoord4fARB = vbo_MultiTexCoord4f; vfmt->MultiTexCoord4fvARB = vbo_MultiTexCoord4fv; vfmt->Normal3f = vbo_Normal3f; vfmt->Normal3fv = vbo_Normal3fv; vfmt->SecondaryColor3fEXT = vbo_SecondaryColor3fEXT; vfmt->SecondaryColor3fvEXT = vbo_SecondaryColor3fvEXT; vfmt->TexCoord1f = vbo_TexCoord1f; vfmt->TexCoord1fv = vbo_TexCoord1fv; vfmt->TexCoord2f = vbo_TexCoord2f; vfmt->TexCoord2fv = vbo_TexCoord2fv; vfmt->TexCoord3f = vbo_TexCoord3f; vfmt->TexCoord3fv = vbo_TexCoord3fv; vfmt->TexCoord4f = vbo_TexCoord4f; vfmt->TexCoord4fv = vbo_TexCoord4fv; vfmt->Vertex2f = vbo_Vertex2f; vfmt->Vertex2fv = vbo_Vertex2fv; vfmt->Vertex3f = vbo_Vertex3f; vfmt->Vertex3fv = vbo_Vertex3fv; vfmt->Vertex4f = vbo_Vertex4f; vfmt->Vertex4fv = vbo_Vertex4fv; vfmt->VertexAttrib1fARB = vbo_VertexAttrib1fARB; vfmt->VertexAttrib1fvARB = vbo_VertexAttrib1fvARB; vfmt->VertexAttrib2fARB = vbo_VertexAttrib2fARB; vfmt->VertexAttrib2fvARB = vbo_VertexAttrib2fvARB; vfmt->VertexAttrib3fARB = vbo_VertexAttrib3fARB; vfmt->VertexAttrib3fvARB = vbo_VertexAttrib3fvARB; vfmt->VertexAttrib4fARB = vbo_VertexAttrib4fARB; vfmt->VertexAttrib4fvARB = vbo_VertexAttrib4fvARB; vfmt->VertexAttrib1fNV = vbo_VertexAttrib1fNV; vfmt->VertexAttrib1fvNV = vbo_VertexAttrib1fvNV; vfmt->VertexAttrib2fNV = vbo_VertexAttrib2fNV; vfmt->VertexAttrib2fvNV = vbo_VertexAttrib2fvNV; vfmt->VertexAttrib3fNV = vbo_VertexAttrib3fNV; vfmt->VertexAttrib3fvNV = vbo_VertexAttrib3fvNV; vfmt->VertexAttrib4fNV = vbo_VertexAttrib4fNV; vfmt->VertexAttrib4fvNV = vbo_VertexAttrib4fvNV; /* integer-valued */ vfmt->VertexAttribI1i = vbo_VertexAttribI1i; vfmt->VertexAttribI2i = vbo_VertexAttribI2i; vfmt->VertexAttribI3i = vbo_VertexAttribI3i; vfmt->VertexAttribI4i = vbo_VertexAttribI4i; vfmt->VertexAttribI2iv = vbo_VertexAttribI2iv; vfmt->VertexAttribI3iv = vbo_VertexAttribI3iv; vfmt->VertexAttribI4iv = vbo_VertexAttribI4iv; /* unsigned integer-valued */ vfmt->VertexAttribI1ui = vbo_VertexAttribI1ui; vfmt->VertexAttribI2ui = vbo_VertexAttribI2ui; vfmt->VertexAttribI3ui = vbo_VertexAttribI3ui; vfmt->VertexAttribI4ui = vbo_VertexAttribI4ui; vfmt->VertexAttribI2uiv = vbo_VertexAttribI2uiv; vfmt->VertexAttribI3uiv = vbo_VertexAttribI3uiv; vfmt->VertexAttribI4uiv = vbo_VertexAttribI4uiv; vfmt->Materialfv = vbo_Materialfv; vfmt->EdgeFlag = vbo_EdgeFlag; vfmt->Indexf = vbo_Indexf; vfmt->Indexfv = vbo_Indexfv; /* ARB_vertex_type_2_10_10_10_rev */ vfmt->VertexP2ui = vbo_VertexP2ui; vfmt->VertexP2uiv = vbo_VertexP2uiv; vfmt->VertexP3ui = vbo_VertexP3ui; vfmt->VertexP3uiv = vbo_VertexP3uiv; vfmt->VertexP4ui = vbo_VertexP4ui; vfmt->VertexP4uiv = vbo_VertexP4uiv; vfmt->TexCoordP1ui = vbo_TexCoordP1ui; vfmt->TexCoordP1uiv = vbo_TexCoordP1uiv; vfmt->TexCoordP2ui = vbo_TexCoordP2ui; vfmt->TexCoordP2uiv = vbo_TexCoordP2uiv; vfmt->TexCoordP3ui = vbo_TexCoordP3ui; vfmt->TexCoordP3uiv = vbo_TexCoordP3uiv; vfmt->TexCoordP4ui = vbo_TexCoordP4ui; vfmt->TexCoordP4uiv = vbo_TexCoordP4uiv; vfmt->MultiTexCoordP1ui = vbo_MultiTexCoordP1ui; vfmt->MultiTexCoordP1uiv = vbo_MultiTexCoordP1uiv; vfmt->MultiTexCoordP2ui = vbo_MultiTexCoordP2ui; vfmt->MultiTexCoordP2uiv = vbo_MultiTexCoordP2uiv; vfmt->MultiTexCoordP3ui = vbo_MultiTexCoordP3ui; vfmt->MultiTexCoordP3uiv = vbo_MultiTexCoordP3uiv; vfmt->MultiTexCoordP4ui = vbo_MultiTexCoordP4ui; vfmt->MultiTexCoordP4uiv = vbo_MultiTexCoordP4uiv; vfmt->NormalP3ui = vbo_NormalP3ui; vfmt->NormalP3uiv = vbo_NormalP3uiv; vfmt->ColorP3ui = vbo_ColorP3ui; vfmt->ColorP3uiv = vbo_ColorP3uiv; vfmt->ColorP4ui = vbo_ColorP4ui; vfmt->ColorP4uiv = vbo_ColorP4uiv; vfmt->SecondaryColorP3ui = vbo_SecondaryColorP3ui; vfmt->SecondaryColorP3uiv = vbo_SecondaryColorP3uiv; vfmt->VertexAttribP1ui = vbo_VertexAttribP1ui; vfmt->VertexAttribP1uiv = vbo_VertexAttribP1uiv; vfmt->VertexAttribP2ui = vbo_VertexAttribP2ui; vfmt->VertexAttribP2uiv = vbo_VertexAttribP2uiv; vfmt->VertexAttribP3ui = vbo_VertexAttribP3ui; vfmt->VertexAttribP3uiv = vbo_VertexAttribP3uiv; vfmt->VertexAttribP4ui = vbo_VertexAttribP4ui; vfmt->VertexAttribP4uiv = vbo_VertexAttribP4uiv; }
static void _save_vtxfmt_init( struct gl_context *ctx ) { struct vbo_save_context *save = &vbo_context(ctx)->save; GLvertexformat *vfmt = &save->vtxfmt; _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); vfmt->Begin = _save_Begin; vfmt->Color3f = _save_Color3f; vfmt->Color3fv = _save_Color3fv; vfmt->Color4f = _save_Color4f; 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; vfmt->Indexfv = _save_Indexfv; vfmt->Materialfv = _save_Materialfv; vfmt->MultiTexCoord1fARB = _save_MultiTexCoord1f; vfmt->MultiTexCoord1fvARB = _save_MultiTexCoord1fv; vfmt->MultiTexCoord2fARB = _save_MultiTexCoord2f; vfmt->MultiTexCoord2fvARB = _save_MultiTexCoord2fv; vfmt->MultiTexCoord3fARB = _save_MultiTexCoord3f; vfmt->MultiTexCoord3fvARB = _save_MultiTexCoord3fv; vfmt->MultiTexCoord4fARB = _save_MultiTexCoord4f; vfmt->MultiTexCoord4fvARB = _save_MultiTexCoord4fv; vfmt->Normal3f = _save_Normal3f; vfmt->Normal3fv = _save_Normal3fv; vfmt->SecondaryColor3fEXT = _save_SecondaryColor3fEXT; vfmt->SecondaryColor3fvEXT = _save_SecondaryColor3fvEXT; vfmt->TexCoord1f = _save_TexCoord1f; vfmt->TexCoord1fv = _save_TexCoord1fv; vfmt->TexCoord2f = _save_TexCoord2f; vfmt->TexCoord2fv = _save_TexCoord2fv; vfmt->TexCoord3f = _save_TexCoord3f; vfmt->TexCoord3fv = _save_TexCoord3fv; vfmt->TexCoord4f = _save_TexCoord4f; vfmt->TexCoord4fv = _save_TexCoord4fv; vfmt->Vertex2f = _save_Vertex2f; vfmt->Vertex2fv = _save_Vertex2fv; vfmt->Vertex3f = _save_Vertex3f; vfmt->Vertex3fv = _save_Vertex3fv; vfmt->Vertex4f = _save_Vertex4f; vfmt->Vertex4fv = _save_Vertex4fv; vfmt->VertexAttrib1fARB = _save_VertexAttrib1fARB; vfmt->VertexAttrib1fvARB = _save_VertexAttrib1fvARB; vfmt->VertexAttrib2fARB = _save_VertexAttrib2fARB; vfmt->VertexAttrib2fvARB = _save_VertexAttrib2fvARB; vfmt->VertexAttrib3fARB = _save_VertexAttrib3fARB; vfmt->VertexAttrib3fvARB = _save_VertexAttrib3fvARB; vfmt->VertexAttrib4fARB = _save_VertexAttrib4fARB; vfmt->VertexAttrib4fvARB = _save_VertexAttrib4fvARB; vfmt->VertexAttrib1fNV = _save_VertexAttrib1fNV; vfmt->VertexAttrib1fvNV = _save_VertexAttrib1fvNV; vfmt->VertexAttrib2fNV = _save_VertexAttrib2fNV; vfmt->VertexAttrib2fvNV = _save_VertexAttrib2fvNV; vfmt->VertexAttrib3fNV = _save_VertexAttrib3fNV; vfmt->VertexAttrib3fvNV = _save_VertexAttrib3fvNV; vfmt->VertexAttrib4fNV = _save_VertexAttrib4fNV; vfmt->VertexAttrib4fvNV = _save_VertexAttrib4fvNV; /* integer-valued */ vfmt->VertexAttribI1i = _save_VertexAttribI1i; vfmt->VertexAttribI2i = _save_VertexAttribI2i; vfmt->VertexAttribI3i = _save_VertexAttribI3i; vfmt->VertexAttribI4i = _save_VertexAttribI4i; vfmt->VertexAttribI2iv = _save_VertexAttribI2iv; vfmt->VertexAttribI3iv = _save_VertexAttribI3iv; vfmt->VertexAttribI4iv = _save_VertexAttribI4iv; /* unsigned integer-valued */ vfmt->VertexAttribI1ui = _save_VertexAttribI1ui; vfmt->VertexAttribI2ui = _save_VertexAttribI2ui; vfmt->VertexAttribI3ui = _save_VertexAttribI3ui; vfmt->VertexAttribI4ui = _save_VertexAttribI4ui; vfmt->VertexAttribI2uiv = _save_VertexAttribI2uiv; vfmt->VertexAttribI3uiv = _save_VertexAttribI3uiv; vfmt->VertexAttribI4uiv = _save_VertexAttribI4uiv; /* This will all require us to fallback to saving the list as opcodes: */ _MESA_INIT_DLIST_VTXFMT(vfmt, _save_); /* inside begin/end */ _MESA_INIT_EVAL_VTXFMT(vfmt, _save_); /* These are all errors as we at least know we are in some sort of * begin/end pair: */ vfmt->Begin = _save_Begin; vfmt->Rectf = _save_Rectf; vfmt->DrawArrays = _save_DrawArrays; vfmt->DrawElements = _save_DrawElements; vfmt->DrawRangeElements = _save_DrawRangeElements; vfmt->DrawElementsBaseVertex = _save_DrawElementsBaseVertex; vfmt->DrawRangeElementsBaseVertex = _save_DrawRangeElementsBaseVertex; /* Loops back into vfmt->DrawElements */ vfmt->MultiDrawElementsEXT = _mesa_noop_MultiDrawElements; vfmt->MultiDrawElementsBaseVertex = _mesa_noop_MultiDrawElementsBaseVertex; }
static void _save_vtxfmt_init(struct gl_context *ctx) { struct vbo_save_context *save = &vbo_context(ctx)->save; GLvertexformat *vfmt = &save->vtxfmt; _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); vfmt->Begin = _save_Begin; vfmt->Color3f = _save_Color3f; vfmt->Color3fv = _save_Color3fv; vfmt->Color4f = _save_Color4f; 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; vfmt->Indexfv = _save_Indexfv; vfmt->Materialfv = _save_Materialfv; vfmt->MultiTexCoord1fARB = _save_MultiTexCoord1f; vfmt->MultiTexCoord1fvARB = _save_MultiTexCoord1fv; vfmt->MultiTexCoord2fARB = _save_MultiTexCoord2f; vfmt->MultiTexCoord2fvARB = _save_MultiTexCoord2fv; vfmt->MultiTexCoord3fARB = _save_MultiTexCoord3f; vfmt->MultiTexCoord3fvARB = _save_MultiTexCoord3fv; vfmt->MultiTexCoord4fARB = _save_MultiTexCoord4f; vfmt->MultiTexCoord4fvARB = _save_MultiTexCoord4fv; vfmt->Normal3f = _save_Normal3f; vfmt->Normal3fv = _save_Normal3fv; vfmt->SecondaryColor3fEXT = _save_SecondaryColor3fEXT; vfmt->SecondaryColor3fvEXT = _save_SecondaryColor3fvEXT; vfmt->TexCoord1f = _save_TexCoord1f; vfmt->TexCoord1fv = _save_TexCoord1fv; vfmt->TexCoord2f = _save_TexCoord2f; vfmt->TexCoord2fv = _save_TexCoord2fv; vfmt->TexCoord3f = _save_TexCoord3f; vfmt->TexCoord3fv = _save_TexCoord3fv; vfmt->TexCoord4f = _save_TexCoord4f; vfmt->TexCoord4fv = _save_TexCoord4fv; vfmt->Vertex2f = _save_Vertex2f; vfmt->Vertex2fv = _save_Vertex2fv; vfmt->Vertex3f = _save_Vertex3f; vfmt->Vertex3fv = _save_Vertex3fv; vfmt->Vertex4f = _save_Vertex4f; vfmt->Vertex4fv = _save_Vertex4fv; vfmt->VertexAttrib1fARB = _save_VertexAttrib1fARB; vfmt->VertexAttrib1fvARB = _save_VertexAttrib1fvARB; vfmt->VertexAttrib2fARB = _save_VertexAttrib2fARB; vfmt->VertexAttrib2fvARB = _save_VertexAttrib2fvARB; vfmt->VertexAttrib3fARB = _save_VertexAttrib3fARB; vfmt->VertexAttrib3fvARB = _save_VertexAttrib3fvARB; vfmt->VertexAttrib4fARB = _save_VertexAttrib4fARB; vfmt->VertexAttrib4fvARB = _save_VertexAttrib4fvARB; vfmt->VertexAttrib1fNV = _save_VertexAttrib1fNV; vfmt->VertexAttrib1fvNV = _save_VertexAttrib1fvNV; vfmt->VertexAttrib2fNV = _save_VertexAttrib2fNV; vfmt->VertexAttrib2fvNV = _save_VertexAttrib2fvNV; vfmt->VertexAttrib3fNV = _save_VertexAttrib3fNV; vfmt->VertexAttrib3fvNV = _save_VertexAttrib3fvNV; vfmt->VertexAttrib4fNV = _save_VertexAttrib4fNV; vfmt->VertexAttrib4fvNV = _save_VertexAttrib4fvNV; /* integer-valued */ vfmt->VertexAttribI1i = _save_VertexAttribI1i; vfmt->VertexAttribI2i = _save_VertexAttribI2i; vfmt->VertexAttribI3i = _save_VertexAttribI3i; vfmt->VertexAttribI4i = _save_VertexAttribI4i; vfmt->VertexAttribI2iv = _save_VertexAttribI2iv; vfmt->VertexAttribI3iv = _save_VertexAttribI3iv; vfmt->VertexAttribI4iv = _save_VertexAttribI4iv; /* unsigned integer-valued */ vfmt->VertexAttribI1ui = _save_VertexAttribI1ui; vfmt->VertexAttribI2ui = _save_VertexAttribI2ui; vfmt->VertexAttribI3ui = _save_VertexAttribI3ui; vfmt->VertexAttribI4ui = _save_VertexAttribI4ui; vfmt->VertexAttribI2uiv = _save_VertexAttribI2uiv; vfmt->VertexAttribI3uiv = _save_VertexAttribI3uiv; vfmt->VertexAttribI4uiv = _save_VertexAttribI4uiv; vfmt->VertexP2ui = _save_VertexP2ui; vfmt->VertexP3ui = _save_VertexP3ui; vfmt->VertexP4ui = _save_VertexP4ui; vfmt->VertexP2uiv = _save_VertexP2uiv; vfmt->VertexP3uiv = _save_VertexP3uiv; vfmt->VertexP4uiv = _save_VertexP4uiv; vfmt->TexCoordP1ui = _save_TexCoordP1ui; vfmt->TexCoordP2ui = _save_TexCoordP2ui; vfmt->TexCoordP3ui = _save_TexCoordP3ui; vfmt->TexCoordP4ui = _save_TexCoordP4ui; vfmt->TexCoordP1uiv = _save_TexCoordP1uiv; vfmt->TexCoordP2uiv = _save_TexCoordP2uiv; vfmt->TexCoordP3uiv = _save_TexCoordP3uiv; vfmt->TexCoordP4uiv = _save_TexCoordP4uiv; vfmt->MultiTexCoordP1ui = _save_MultiTexCoordP1ui; vfmt->MultiTexCoordP2ui = _save_MultiTexCoordP2ui; vfmt->MultiTexCoordP3ui = _save_MultiTexCoordP3ui; vfmt->MultiTexCoordP4ui = _save_MultiTexCoordP4ui; vfmt->MultiTexCoordP1uiv = _save_MultiTexCoordP1uiv; vfmt->MultiTexCoordP2uiv = _save_MultiTexCoordP2uiv; vfmt->MultiTexCoordP3uiv = _save_MultiTexCoordP3uiv; vfmt->MultiTexCoordP4uiv = _save_MultiTexCoordP4uiv; vfmt->NormalP3ui = _save_NormalP3ui; vfmt->NormalP3uiv = _save_NormalP3uiv; vfmt->ColorP3ui = _save_ColorP3ui; vfmt->ColorP4ui = _save_ColorP4ui; vfmt->ColorP3uiv = _save_ColorP3uiv; vfmt->ColorP4uiv = _save_ColorP4uiv; vfmt->SecondaryColorP3ui = _save_SecondaryColorP3ui; vfmt->SecondaryColorP3uiv = _save_SecondaryColorP3uiv; vfmt->VertexAttribP1ui = _save_VertexAttribP1ui; vfmt->VertexAttribP2ui = _save_VertexAttribP2ui; vfmt->VertexAttribP3ui = _save_VertexAttribP3ui; vfmt->VertexAttribP4ui = _save_VertexAttribP4ui; vfmt->VertexAttribP1uiv = _save_VertexAttribP1uiv; vfmt->VertexAttribP2uiv = _save_VertexAttribP2uiv; vfmt->VertexAttribP3uiv = _save_VertexAttribP3uiv; vfmt->VertexAttribP4uiv = _save_VertexAttribP4uiv; /* This will all require us to fallback to saving the list as opcodes: */ _MESA_INIT_DLIST_VTXFMT(vfmt, _save_); /* inside begin/end */ _MESA_INIT_EVAL_VTXFMT(vfmt, _save_); /* These calls all generate GL_INVALID_OPERATION since this vtxfmt is * only used when we're inside a glBegin/End pair. */ vfmt->Begin = _save_Begin; vfmt->Rectf = _save_Rectf; vfmt->DrawArrays = _save_DrawArrays; vfmt->DrawElements = _save_DrawElements; vfmt->DrawRangeElements = _save_DrawRangeElements; vfmt->DrawElementsBaseVertex = _save_DrawElementsBaseVertex; vfmt->DrawRangeElementsBaseVertex = _save_DrawRangeElementsBaseVertex; vfmt->DrawTransformFeedback = _save_DrawTransformFeedback; vfmt->MultiDrawElementsEXT = _save_MultiDrawElements; vfmt->MultiDrawElementsBaseVertex = _save_MultiDrawElementsBaseVertex; }
/** * Build a vertexformat of functions that are no-ops. * These are used in out-of-memory situations when we have no VBO * to put the vertex data into. */ void _mesa_noop_vtxfmt_init(GLvertexformat * vfmt) { _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); vfmt->Begin = _mesa_noop_Begin; _MESA_INIT_DLIST_VTXFMT(vfmt, _mesa_); vfmt->Color3f = _mesa_noop_Color3f; vfmt->Color3fv = _mesa_noop_Color3fv; vfmt->Color4f = _mesa_noop_Color4f; vfmt->Color4fv = _mesa_noop_Color4fv; vfmt->EdgeFlag = _mesa_noop_EdgeFlag; vfmt->End = _mesa_noop_End; vfmt->PrimitiveRestartNV = _mesa_noop_PrimitiveRestartNV; _MESA_INIT_EVAL_VTXFMT(vfmt, _mesa_noop_); vfmt->FogCoordfEXT = _mesa_noop_FogCoordfEXT; vfmt->FogCoordfvEXT = _mesa_noop_FogCoordfvEXT; vfmt->Indexf = _mesa_noop_Indexf; vfmt->Indexfv = _mesa_noop_Indexfv; vfmt->Materialfv = _mesa_noop_Materialfv; vfmt->MultiTexCoord1fARB = _mesa_noop_MultiTexCoord1fARB; vfmt->MultiTexCoord1fvARB = _mesa_noop_MultiTexCoord1fvARB; vfmt->MultiTexCoord2fARB = _mesa_noop_MultiTexCoord2fARB; vfmt->MultiTexCoord2fvARB = _mesa_noop_MultiTexCoord2fvARB; vfmt->MultiTexCoord3fARB = _mesa_noop_MultiTexCoord3fARB; vfmt->MultiTexCoord3fvARB = _mesa_noop_MultiTexCoord3fvARB; vfmt->MultiTexCoord4fARB = _mesa_noop_MultiTexCoord4fARB; vfmt->MultiTexCoord4fvARB = _mesa_noop_MultiTexCoord4fvARB; vfmt->Normal3f = _mesa_noop_Normal3f; vfmt->Normal3fv = _mesa_noop_Normal3fv; vfmt->SecondaryColor3fEXT = _mesa_noop_SecondaryColor3fEXT; vfmt->SecondaryColor3fvEXT = _mesa_noop_SecondaryColor3fvEXT; vfmt->TexCoord1f = _mesa_noop_TexCoord1f; vfmt->TexCoord1fv = _mesa_noop_TexCoord1fv; vfmt->TexCoord2f = _mesa_noop_TexCoord2f; vfmt->TexCoord2fv = _mesa_noop_TexCoord2fv; vfmt->TexCoord3f = _mesa_noop_TexCoord3f; vfmt->TexCoord3fv = _mesa_noop_TexCoord3fv; vfmt->TexCoord4f = _mesa_noop_TexCoord4f; vfmt->TexCoord4fv = _mesa_noop_TexCoord4fv; vfmt->Vertex2f = _mesa_noop_Vertex2f; vfmt->Vertex2fv = _mesa_noop_Vertex2fv; vfmt->Vertex3f = _mesa_noop_Vertex3f; vfmt->Vertex3fv = _mesa_noop_Vertex3fv; vfmt->Vertex4f = _mesa_noop_Vertex4f; vfmt->Vertex4fv = _mesa_noop_Vertex4fv; vfmt->VertexAttrib1fNV = _mesa_noop_VertexAttrib1fNV; vfmt->VertexAttrib1fvNV = _mesa_noop_VertexAttrib1fvNV; vfmt->VertexAttrib2fNV = _mesa_noop_VertexAttrib2fNV; vfmt->VertexAttrib2fvNV = _mesa_noop_VertexAttrib2fvNV; vfmt->VertexAttrib3fNV = _mesa_noop_VertexAttrib3fNV; vfmt->VertexAttrib3fvNV = _mesa_noop_VertexAttrib3fvNV; vfmt->VertexAttrib4fNV = _mesa_noop_VertexAttrib4fNV; vfmt->VertexAttrib4fvNV = _mesa_noop_VertexAttrib4fvNV; vfmt->VertexAttrib1fARB = _mesa_noop_VertexAttrib1fARB; vfmt->VertexAttrib1fvARB = _mesa_noop_VertexAttrib1fvARB; vfmt->VertexAttrib2fARB = _mesa_noop_VertexAttrib2fARB; vfmt->VertexAttrib2fvARB = _mesa_noop_VertexAttrib2fvARB; vfmt->VertexAttrib3fARB = _mesa_noop_VertexAttrib3fARB; vfmt->VertexAttrib3fvARB = _mesa_noop_VertexAttrib3fvARB; vfmt->VertexAttrib4fARB = _mesa_noop_VertexAttrib4fARB; vfmt->VertexAttrib4fvARB = _mesa_noop_VertexAttrib4fvARB; vfmt->Rectf = _mesa_noop_Rectf; vfmt->DrawArrays = _mesa_noop_DrawArrays; vfmt->DrawElements = _mesa_noop_DrawElements; vfmt->DrawRangeElements = _mesa_noop_DrawRangeElements; vfmt->MultiDrawElementsEXT = _mesa_noop_MultiDrawElements; vfmt->DrawElementsBaseVertex = _mesa_noop_DrawElementsBaseVertex; vfmt->DrawRangeElementsBaseVertex = _mesa_noop_DrawRangeElementsBaseVertex; vfmt->MultiDrawElementsBaseVertex = _mesa_noop_MultiDrawElementsBaseVertex; }