📄 mtypes.h
字号:
GLuint Hits; /**< number of records in the selection buffer */ GLuint NameStackDepth; /**< name stack depth */ GLuint NameStack[MAX_NAME_STACK_DEPTH]; /**< name stack */ GLboolean HitFlag; /**< hit flag */ GLfloat HitMinZ; /**< minimum hit depth */ GLfloat HitMaxZ; /**< maximum hit depth */};/** * 1-D Evaluator control points */struct gl_1d_map{ GLuint Order; /**< Number of control points */ GLfloat u1, u2, du; /**< u1, u2, 1.0/(u2-u1) */ GLfloat *Points; /**< Points to contiguous control points */};/** * 2-D Evaluator control points */struct gl_2d_map{ GLuint Uorder; /**< Number of control points in U dimension */ GLuint Vorder; /**< Number of control points in V dimension */ GLfloat u1, u2, du; GLfloat v1, v2, dv; GLfloat *Points; /**< Points to contiguous control points */};/** * All evaluator control point state */struct gl_evaluators{ /** * \name 1-D maps */ /*@{*/ struct gl_1d_map Map1Vertex3; struct gl_1d_map Map1Vertex4; struct gl_1d_map Map1Index; struct gl_1d_map Map1Color4; struct gl_1d_map Map1Normal; struct gl_1d_map Map1Texture1; struct gl_1d_map Map1Texture2; struct gl_1d_map Map1Texture3; struct gl_1d_map Map1Texture4; struct gl_1d_map Map1Attrib[16]; /**< GL_NV_vertex_program */ /*@}*/ /** * \name 2-D maps */ /*@{*/ struct gl_2d_map Map2Vertex3; struct gl_2d_map Map2Vertex4; struct gl_2d_map Map2Index; struct gl_2d_map Map2Color4; struct gl_2d_map Map2Normal; struct gl_2d_map Map2Texture1; struct gl_2d_map Map2Texture2; struct gl_2d_map Map2Texture3; struct gl_2d_map Map2Texture4; struct gl_2d_map Map2Attrib[16]; /**< GL_NV_vertex_program */ /*@}*/};/** * Names of the various vertex/fragment program register files, etc. * * NOTE: first four tokens must fit into 2 bits (see t_vb_arbprogram.c) * All values should fit in a 4-bit field. * * NOTE: PROGRAM_ENV_PARAM, PROGRAM_STATE_VAR, PROGRAM_NAMED_PARAM, * PROGRAM_CONSTANT, and PROGRAM_UNIFORM can all be considered to * be "uniform" variables since they can only be set outside glBegin/End. * They're also all stored in the same Parameters array. */enum register_file{ PROGRAM_TEMPORARY = 0, /**< machine->Temporary[] */ PROGRAM_LOCAL_PARAM = 1, /**< gl_program->LocalParams[] */ PROGRAM_ENV_PARAM = 2, /**< gl_program->Parameters[] */ PROGRAM_STATE_VAR = 3, /**< gl_program->Parameters[] */ PROGRAM_INPUT = 4, /**< machine->Inputs[] */ PROGRAM_OUTPUT = 5, /**< machine->Outputs[] */ PROGRAM_NAMED_PARAM = 6, /**< gl_program->Parameters[] */ PROGRAM_CONSTANT = 7, /**< gl_program->Parameters[] */ PROGRAM_UNIFORM = 8, /**< gl_program->Parameters[] */ PROGRAM_VARYING = 9, /**< machine->Inputs[]/Outputs[] */ PROGRAM_WRITE_ONLY = 10, /**< A dummy, write-only register */ PROGRAM_ADDRESS = 11, /**< machine->AddressReg */ PROGRAM_SAMPLER = 12, /**< for shader samplers, compile-time only */ PROGRAM_UNDEFINED = 13, /**< Invalid value */ PROGRAM_FILE_MAX};/** Vertex and fragment instructions */struct prog_instruction;struct gl_program_parameter_list;struct gl_uniform_list;/** * Base class for any kind of program object */struct gl_program{ GLuint Id; GLubyte *String; /**< Null-terminated program text */ GLint RefCount; GLenum Target; /**< GL_VERTEX/FRAGMENT_PROGRAM_ARB, GL_FRAGMENT_PROGRAM_NV */ GLenum Format; /**< String encoding format */ GLboolean Resident; struct prog_instruction *Instructions; GLbitfield InputsRead; /**< Bitmask of which input regs are read */ GLbitfield OutputsWritten; /**< Bitmask of which output regs are written to */ GLbitfield TexturesUsed[MAX_TEXTURE_IMAGE_UNITS]; /**< TEXTURE_x_BIT bitmask */ GLbitfield SamplersUsed; /**< Bitfield of which samplers are used */ GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */ /** Named parameters, constants, etc. from program text */ struct gl_program_parameter_list *Parameters; /** Numbered local parameters */ GLfloat LocalParams[MAX_PROGRAM_LOCAL_PARAMS][4]; /** Vertex/fragment shader varying vars */ struct gl_program_parameter_list *Varying; /** Vertex program user-defined attributes */ struct gl_program_parameter_list *Attributes; /** Map from sampler unit to texture unit (set by glUniform1i()) */ GLubyte SamplerUnits[MAX_SAMPLERS]; /** Which texture target is being sampled (TEXTURE_1D/2D/3D/etc_INDEX) */ GLubyte SamplerTargets[MAX_SAMPLERS]; /** Logical counts */ /*@{*/ GLuint NumInstructions; GLuint NumTemporaries; GLuint NumParameters; GLuint NumAttributes; GLuint NumAddressRegs; GLuint NumAluInstructions; GLuint NumTexInstructions; GLuint NumTexIndirections; /*@}*/ /** Native, actual h/w counts */ /*@{*/ GLuint NumNativeInstructions; GLuint NumNativeTemporaries; GLuint NumNativeParameters; GLuint NumNativeAttributes; GLuint NumNativeAddressRegs; GLuint NumNativeAluInstructions; GLuint NumNativeTexInstructions; GLuint NumNativeTexIndirections; /*@}*/};/** Vertex program object */struct gl_vertex_program{ struct gl_program Base; /**< base class */ GLboolean IsNVProgram; /**< is this a GL_NV_vertex_program program? */ GLboolean IsPositionInvariant; void *TnlData; /**< should probably use Base.DriverData */};/** Fragment program object */struct gl_fragment_program{ struct gl_program Base; /**< base class */ GLenum FogOption; GLboolean UsesKill;};/** * State common to vertex and fragment programs. */struct gl_program_state{ GLint ErrorPos; /* GL_PROGRAM_ERROR_POSITION_ARB/NV */ const char *ErrorString; /* GL_PROGRAM_ERROR_STRING_ARB/NV */};/** * 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 */ struct gl_vertex_program *Current; /**< user-bound vertex program */ /** Currently enabled and valid program (including internal programs * and compiled shader programs). */ struct gl_vertex_program *_Current; GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ /* For GL_NV_vertex_program only: */ GLenum TrackMatrix[MAX_PROGRAM_ENV_PARAMS / 4]; GLenum TrackMatrixTransform[MAX_PROGRAM_ENV_PARAMS / 4]; /** Should fixed-function T&L be implemented with a vertex prog? */ GLboolean _MaintainTnlProgram; /** Program to emulate fixed-function T&L (see above) */ struct gl_vertex_program *_TnlProgram;#if FEATURE_MESA_program_debug GLprogramcallbackMESA Callback; GLvoid *CallbackData; GLboolean CallbackEnabled; GLuint CurrentPosition;#endif};/** * Context state for fragment programs. */struct gl_fragment_program_state{ GLboolean Enabled; /**< User-set fragment program enable flag */ GLboolean _Enabled; /**< Fragment program enabled and valid? */ GLboolean _Active; struct gl_fragment_program *Current; /**< User-bound fragment program */ /** Currently enabled and valid program (including internal programs * and compiled shader programs). */ struct gl_fragment_program *_Current; GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ /** Should fixed-function texturing be implemented with a fragment prog? */ GLboolean _MaintainTexEnvProgram; GLboolean _UseTexEnvProgram; /** Program to emulate fixed-function texture env/combine (see above) */ struct gl_fragment_program *_TexEnvProgram;#if FEATURE_MESA_program_debug GLprogramcallbackMESA Callback; GLvoid *CallbackData; GLboolean CallbackEnabled; GLuint CurrentPosition;#endif};/** * ATI_fragment_shader runtime state */#define ATI_FS_INPUT_PRIMARY 0#define ATI_FS_INPUT_SECONDARY 1struct atifs_instruction;struct atifs_setupinst;/** * ATI fragment shader */struct ati_fragment_shader{ GLuint Id; GLint RefCount; struct atifs_instruction *Instructions[2]; struct atifs_setupinst *SetupInst[2]; GLfloat Constants[8][4]; GLbitfield LocalConstDef; /** Indicates which constants have been set */ GLubyte numArithInstr[2]; GLubyte regsAssigned[2]; GLubyte NumPasses; /** 1 or 2 */ GLubyte cur_pass; GLubyte last_optype; GLboolean interpinp1; GLboolean isValid; GLuint swizzlerq;};/** * Context state for GL_ATI_fragment_shader */struct gl_ati_fragment_shader_state{ GLboolean Enabled; GLboolean _Enabled; /** enabled and valid shader? */ GLboolean Compiling; GLfloat GlobalConstants[8][4]; struct ati_fragment_shader *Current;};/** * Occlusion/timer query object. */struct gl_query_object{ GLuint Id; GLuint64EXT Result; /* the counter */ GLboolean Active; /* inside Begin/EndQuery */ GLboolean Ready; /* result is ready */};/** * Context state for query objects. */struct gl_query_state{ struct _mesa_HashTable *QueryObjects; struct gl_query_object *CurrentOcclusionObject; /* GL_ARB_occlusion_query */ struct gl_query_object *CurrentTimerObject; /* GL_EXT_timer_query */};/** * A GLSL vertex or fragment shader object. */struct gl_shader{ GLenum Type; /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER (first field!) */ GLuint Name; /**< AKA the handle */ GLint RefCount; /**< Reference count */ GLboolean DeletePending; const GLchar *Source; /**< Source code string */ GLboolean CompileStatus; struct gl_program *Program; /**< Post-compile assembly code */ GLchar *InfoLog; GLboolean Main; /**< shader defines main() */};/** * A GLSL program object. * Basically a linked collection of vertex and fragment shaders. */struct gl_shader_program{ GLenum Type; /**< Always GL_SHADER_PROGRAM (internal token) */ GLuint Name; /**< aka handle or ID */ GLint RefCount; /**< Reference count */ GLboolean DeletePending; GLuint NumShaders; /**< number of attached shaders */ struct gl_shader **Shaders; /**< List of attached the shaders */ /** User-defined attribute bindings (glBindAttribLocation) */ struct gl_program_parameter_list *Attributes; /* post-link info: */ struct gl_vertex_program *VertexProgram; /**< Linked vertex program */ struct gl_fragment_program *FragmentProgram; /**< Linked fragment prog */ struct gl_uniform_list *Uniforms; struct gl_program_parameter_list *Varying; GLboolean LinkStatus; /**< GL_LINK_STATUS */ GLboolean Validated; GLchar *InfoLog;}; /** * Context state for GLSL vertex/fragment shaders. */struct gl_shader_state{ struct gl_shader_program *CurrentProgram; /**< The user-bound program */ /** Driver-selectable options: */ GLboolean EmitHighLevelInstructions; /**< IF/ELSE/ENDIF vs. BRA, etc. */ GLboolean EmitCondCodes; /**< Use condition codes? */ GLboolean EmitComments; /**< Annotated instructions */ void *MemPool;};/** * State which can be shared by multiple contexts: */struct gl_shared_state{ _glthread_Mutex Mutex; /**< for thread safety */ GLint RefCount; /**< Reference count */ struct _mesa_HashTable *DisplayList; /**< Display lists hash table */ struct _mesa_HashTable *TexObjects; /**< Texture objects hash table */ /** * \name Default texture objects (shared by all multi-texture units) */ /*@{*/ struct gl_texture_object *Default1D; struct gl_texture_object *Default2D; struct gl_texture_object *Default3D; struct gl_texture_object *DefaultCubeMap; struct gl_texture_object *DefaultRect; struct gl_texture_object *Default1DArray; struct gl_texture_object *Default2DArray; /*@}*/ /** * \name Thread safety and statechange notification for texture * objects. * * \todo Improve the granularity of locking. */ /*@{*/ _glthread_Mutex TexMutex; /**< texobj thread safety */ GLuint TextureStateStamp; /**< state notification for shared tex */ /*@}*/ /** * \name Vertex/fragment programs */ /*@{*/ struct _mesa_HashTable *Programs; /**< All vertex/fragment programs */#if FEATURE_ARB_vertex_program struct gl_vertex_program *DefaultVertexProgram;#endif#if FEATURE_ARB_fragment_program struct gl_fragment_program *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -