diff options
-rw-r--r-- | src/mesa/main/mtypes.h | 162 |
1 files changed, 85 insertions, 77 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 082c43fdf11..ac2b26d8cd5 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1844,79 +1844,87 @@ struct gl_occlusion_state GLuint PassedCounter; struct _mesa_HashTable *QueryObjects; }; -
-/* gl2 unique interface identifier */
-/* each gl2 interface has its own interface id used for object queries */
-enum gl2_uiid
-{
- UIID_UNKNOWN, /* supported by all objects */
- UIID_GENERIC, /* generic object */
- UIID_CONTAINER, /* contains generic objects */
- UIID_SHADER, /* shader object */
- UIID_FRAGMENT_SHADER, /* fragment shader */
- UIID_VERTEX_SHADER, /* vertex shader */
- UIID_PROGRAM /* program object */
-};
-
-struct gl2_unknown_intf
-{
- GLvoid (* AddRef) (struct gl2_unknown_intf **);
- GLvoid (* Release) (struct gl2_unknown_intf **);
- struct gl2_unknown_intf **(* QueryInterface) (struct gl2_unknown_intf **, enum gl2_uiid uiid);
-};
-
-struct gl2_generic_intf
-{
- struct gl2_unknown_intf _unknown;
- GLvoid (* Delete) (struct gl2_generic_intf **);
- GLenum (* GetType) (struct gl2_generic_intf **);
- GLhandleARB (* GetName) (struct gl2_generic_intf **);
- GLboolean (* GetDeleteStatus) (struct gl2_generic_intf **);
- const GLcharARB *(* GetInfoLog) (struct gl2_generic_intf **);
-};
-
-struct gl2_container_intf
-{
- struct gl2_generic_intf _generic;
- GLboolean (* Attach) (struct gl2_container_intf **, struct gl2_generic_intf **);
- GLboolean (* Detach) (struct gl2_container_intf **, struct gl2_generic_intf **);
- GLsizei (* GetAttachedCount) (struct gl2_container_intf **);
- struct gl2_generic_intf **(* GetAttached) (struct gl2_container_intf **, GLuint);
-};
-
-struct gl2_shader_intf
-{
- struct gl2_generic_intf _generic;
- GLenum (* GetSubType) (struct gl2_shader_intf **);
- GLboolean (* GetCompileStatus) (struct gl2_shader_intf **);
- GLvoid (* SetSource) (struct gl2_shader_intf **, GLcharARB *, GLint *, GLsizei);
- const GLcharARB *(* GetSource) (struct gl2_shader_intf **);
- GLvoid (* Compile) (struct gl2_shader_intf **);
-};
-
-struct gl2_program_intf
-{
- struct gl2_container_intf _container;
- GLboolean (* GetLinkStatus) (struct gl2_program_intf **);
- GLboolean (* GetValidateStatus) (struct gl2_program_intf **);
- GLvoid (* Link) (struct gl2_program_intf **);
- GLvoid (* Validate) (struct gl2_program_intf **);
-};
-
-struct gl2_fragment_shader_intf
-{
- struct gl2_shader_intf _shader;
-};
-
-struct gl2_vertex_shader_intf
-{
- struct gl2_shader_intf _shader;
-};
-
-struct gl_shader_objects_state
-{
- struct gl2_program_intf **current_program;
-};
+ + +/** + * XXX Can we move all these gl2 datatypes into the shader directory??? + */ + + +/** + * gl2 unique interface identifier. + * Each gl2 interface has its own interface id used for object queries. + */ +enum gl2_uiid +{ + UIID_UNKNOWN, /* supported by all objects */ + UIID_GENERIC, /* generic object */ + UIID_CONTAINER, /* contains generic objects */ + UIID_SHADER, /* shader object */ + UIID_FRAGMENT_SHADER, /* fragment shader */ + UIID_VERTEX_SHADER, /* vertex shader */ + UIID_PROGRAM /* program object */ +}; + +struct gl2_unknown_intf +{ + GLvoid (* AddRef) (struct gl2_unknown_intf **); + GLvoid (* Release) (struct gl2_unknown_intf **); + struct gl2_unknown_intf **(* QueryInterface) (struct gl2_unknown_intf **, enum gl2_uiid uiid); +}; + +struct gl2_generic_intf +{ + struct gl2_unknown_intf _unknown; + GLvoid (* Delete) (struct gl2_generic_intf **); + GLenum (* GetType) (struct gl2_generic_intf **); + GLhandleARB (* GetName) (struct gl2_generic_intf **); + GLboolean (* GetDeleteStatus) (struct gl2_generic_intf **); + const GLcharARB *(* GetInfoLog) (struct gl2_generic_intf **); +}; + +struct gl2_container_intf +{ + struct gl2_generic_intf _generic; + GLboolean (* Attach) (struct gl2_container_intf **, struct gl2_generic_intf **); + GLboolean (* Detach) (struct gl2_container_intf **, struct gl2_generic_intf **); + GLsizei (* GetAttachedCount) (struct gl2_container_intf **); + struct gl2_generic_intf **(* GetAttached) (struct gl2_container_intf **, GLuint); +}; + +struct gl2_shader_intf +{ + struct gl2_generic_intf _generic; + GLenum (* GetSubType) (struct gl2_shader_intf **); + GLboolean (* GetCompileStatus) (struct gl2_shader_intf **); + GLvoid (* SetSource) (struct gl2_shader_intf **, GLcharARB *, GLint *, GLsizei); + const GLcharARB *(* GetSource) (struct gl2_shader_intf **); + GLvoid (* Compile) (struct gl2_shader_intf **); +}; + +struct gl2_program_intf +{ + struct gl2_container_intf _container; + GLboolean (* GetLinkStatus) (struct gl2_program_intf **); + GLboolean (* GetValidateStatus) (struct gl2_program_intf **); + GLvoid (* Link) (struct gl2_program_intf **); + GLvoid (* Validate) (struct gl2_program_intf **); +}; + +struct gl2_fragment_shader_intf +{ + struct gl2_shader_intf _shader; +}; + +struct gl2_vertex_shader_intf +{ + struct gl2_shader_intf _shader; +}; + +struct gl_shader_objects_state +{ + struct gl2_program_intf **current_program; +}; /** @@ -1959,8 +1967,8 @@ struct gl_shared_state #if FEATURE_ARB_vertex_buffer_object struct _mesa_HashTable *BufferObjects; -#endif
-
+#endif + struct _mesa_HashTable *GL2Objects; void *DriverData; /**< Device driver shared state */ @@ -2591,8 +2599,8 @@ struct __GLcontextRec struct gl_fragment_program_state FragmentProgram; /**< GL_NV_fragment_program */ struct gl_ati_fragment_shader_state ATIFragmentShader; /**< GL_ATI_fragment_shader */ - struct gl_occlusion_state Occlusion; /**< GL_ARB_occlusion_query */
-
+ struct gl_occlusion_state Occlusion; /**< GL_ARB_occlusion_query */ + struct gl_shader_objects_state ShaderObjects; /* GL_ARB_shader_objects */ /*@}*/ |