diff options
author | Brian Paul <[email protected]> | 2006-10-10 22:45:50 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-10-10 22:45:50 +0000 |
commit | 81968ec49d9e06be0e095fa0084aa61b68b23d75 (patch) | |
tree | fa905da9fed031eed3e7c27ca2387101c6820dea /src/mesa/main | |
parent | c61ecf373e58151aa7d3a4244ef139e015676b66 (diff) |
a step toward moving run-time vertex program state out of GLcontext
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/mtypes.h | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index ff6b053c230..799e647731a 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1913,30 +1913,41 @@ struct gl_program_state /** - * State vars for GL_ARB/GL_NV_vertex_program + * Virtual vertex program machine state. + * Only used during program execution (may be moved someday): + */ +struct gl_vertex_program_machine +{ + GLfloat Temporaries[MAX_NV_VERTEX_PROGRAM_TEMPS][4]; + GLfloat Inputs[MAX_NV_VERTEX_PROGRAM_INPUTS][4]; + GLuint InputsSize[MAX_NV_VERTEX_PROGRAM_INPUTS]; + GLfloat Outputs[MAX_NV_VERTEX_PROGRAM_OUTPUTS][4]; + GLint AddressReg[4]; +}; + + +/** + * Context state for vertex programs. */ struct gl_vertex_program_state { - GLboolean Enabled; /**< GL_VERTEX_PROGRAM_ARB/NV */ - GLboolean _Enabled; /**< Enabled and valid program? */ - GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */ - GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */ + GLboolean Enabled; /**< GL_VERTEX_PROGRAM_ARB/NV */ + GLboolean _Enabled; /**< Enabled and valid program? */ + GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */ + GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */ struct gl_vertex_program *Current; /**< ptr to currently bound program */ const struct gl_vertex_program *_Current; /**< ptr to currently bound program, including internal (t_vp_build.c) programs */ + GLfloat Parameters[MAX_NV_VERTEX_PROGRAM_PARAMS][4]; /**< Env params */ + + struct gl_vertex_program_machine Machine; + + /* For GL_NV_vertex_program only: */ GLenum TrackMatrix[MAX_NV_VERTEX_PROGRAM_PARAMS / 4]; GLenum TrackMatrixTransform[MAX_NV_VERTEX_PROGRAM_PARAMS / 4]; - GLfloat Parameters[MAX_NV_VERTEX_PROGRAM_PARAMS][4]; /* Env params */ - /* Only used during program execution (may be moved someday): */ - GLfloat Temporaries[MAX_NV_VERTEX_PROGRAM_TEMPS][4]; - GLfloat Inputs[MAX_NV_VERTEX_PROGRAM_INPUTS][4]; - GLuint InputsSize[MAX_NV_VERTEX_PROGRAM_INPUTS]; - GLfloat Outputs[MAX_NV_VERTEX_PROGRAM_OUTPUTS][4]; - GLint AddressReg[4]; - #if FEATURE_MESA_program_debug GLprogramcallbackMESA Callback; GLvoid *CallbackData; @@ -1947,7 +1958,7 @@ struct gl_vertex_program_state /** - * Context state for GL_ARB/NV_fragment_program + * Context state for fragment programs. */ struct gl_fragment_program_state { |