⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mtypes.h

📁 mesa-6.5-minigui源码
💻 H
📖 第 1 页 / 共 5 页
字号:
{   GLboolean SmoothFlag;	/**< GL_LINE_SMOOTH enabled? */   GLboolean StippleFlag;	/**< GL_LINE_STIPPLE enabled? */   GLushort StipplePattern;	/**< Stipple pattern */   GLint StippleFactor;		/**< Stipple repeat factor */   GLfloat Width;		/**< Line width */   GLfloat _Width;		/**< Clamped Line width */};/** * Display list attribute group (GL_LIST_BIT). */struct gl_list_attrib{   GLuint ListBase;};/** * Used by device drivers to hook new commands into display lists. */struct gl_list_instruction{   GLuint Size;   void (*Execute)( GLcontext *ctx, void *data );   void (*Destroy)( GLcontext *ctx, void *data );   void (*Print)( GLcontext *ctx, void *data );};#define MAX_DLIST_EXT_OPCODES 16/** * Used by device drivers to hook new commands into display lists. */struct gl_list_extensions{   struct gl_list_instruction Opcode[MAX_DLIST_EXT_OPCODES];   GLuint NumOpcodes;};/** * Multisample attribute group (GL_MULTISAMPLE_BIT). */struct gl_multisample_attrib{   GLboolean Enabled;   GLboolean SampleAlphaToCoverage;   GLboolean SampleAlphaToOne;   GLboolean SampleCoverage;   GLfloat SampleCoverageValue;   GLboolean SampleCoverageInvert;};/** * Pixel attribute group (GL_PIXEL_MODE_BIT). */struct gl_pixel_attrib{   GLenum ReadBuffer;		/**< source buffer for glRead/CopyPixels() */   GLfloat RedBias, RedScale;   GLfloat GreenBias, GreenScale;   GLfloat BlueBias, BlueScale;   GLfloat AlphaBias, AlphaScale;   GLfloat DepthBias, DepthScale;   GLint IndexShift, IndexOffset;   GLboolean MapColorFlag;   GLboolean MapStencilFlag;   GLfloat ZoomX, ZoomY;   /* XXX move these out of gl_pixel_attrib */   GLint MapStoSsize;		/**< Size of each pixel map */   GLint MapItoIsize;   GLint MapItoRsize;   GLint MapItoGsize;   GLint MapItoBsize;   GLint MapItoAsize;   GLint MapRtoRsize;   GLint MapGtoGsize;   GLint MapBtoBsize;   GLint MapAtoAsize;   GLint MapStoS[MAX_PIXEL_MAP_TABLE];	/**< Pixel map tables */   GLfloat MapItoI[MAX_PIXEL_MAP_TABLE];   GLfloat MapItoR[MAX_PIXEL_MAP_TABLE];   GLfloat MapItoG[MAX_PIXEL_MAP_TABLE];   GLfloat MapItoB[MAX_PIXEL_MAP_TABLE];   GLfloat MapItoA[MAX_PIXEL_MAP_TABLE];   GLubyte MapItoR8[MAX_PIXEL_MAP_TABLE];  /**< converted to 8-bit color */   GLubyte MapItoG8[MAX_PIXEL_MAP_TABLE];   GLubyte MapItoB8[MAX_PIXEL_MAP_TABLE];   GLubyte MapItoA8[MAX_PIXEL_MAP_TABLE];   GLfloat MapRtoR[MAX_PIXEL_MAP_TABLE];   GLfloat MapGtoG[MAX_PIXEL_MAP_TABLE];   GLfloat MapBtoB[MAX_PIXEL_MAP_TABLE];   GLfloat MapAtoA[MAX_PIXEL_MAP_TABLE];   /** GL_EXT_histogram */   GLboolean HistogramEnabled;   GLboolean MinMaxEnabled;   /** GL_SGI_color_matrix */   GLfloat PostColorMatrixScale[4];  /**< RGBA */   GLfloat PostColorMatrixBias[4];   /**< RGBA */   /** GL_SGI_color_table */   GLfloat ColorTableScale[4];   GLfloat ColorTableBias[4];   GLboolean ColorTableEnabled;   GLfloat PCCTscale[4];   GLfloat PCCTbias[4];   GLboolean PostConvolutionColorTableEnabled;   GLfloat PCMCTscale[4];   GLfloat PCMCTbias[4];   GLboolean PostColorMatrixColorTableEnabled;   /** GL_SGI_texture_color_table */   GLfloat TextureColorTableScale[4];   GLfloat TextureColorTableBias[4];   /** Convolution */   GLboolean Convolution1DEnabled;   GLboolean Convolution2DEnabled;   GLboolean Separable2DEnabled;   GLfloat ConvolutionBorderColor[3][4];   GLenum ConvolutionBorderMode[3];   GLfloat ConvolutionFilterScale[3][4];   GLfloat ConvolutionFilterBias[3][4];   GLfloat PostConvolutionScale[4];  /**< RGBA */   GLfloat PostConvolutionBias[4];   /**< RGBA */};/** * Point attribute group (GL_POINT_BIT). */struct gl_point_attrib{   GLboolean SmoothFlag;	/**< True if GL_POINT_SMOOTH is enabled */   GLfloat Size;		/**< User-specified point size */   GLfloat _Size;		/**< Size clamped to Const.Min/MaxPointSize */   GLfloat Params[3];		/**< GL_EXT_point_parameters */   GLfloat MinSize, MaxSize;	/**< GL_EXT_point_parameters */   GLfloat Threshold;		/**< GL_EXT_point_parameters */   GLboolean _Attenuated;	/**< True if Params != [1, 0, 0] */   GLboolean PointSprite;	/**< GL_NV_point_sprite / GL_NV_point_sprite */   GLboolean CoordReplace[MAX_TEXTURE_UNITS]; /**< GL_NV/ARB_point_sprite */   GLenum SpriteRMode;		/**< GL_NV_point_sprite (only!) */   GLenum SpriteOrigin;		/**< GL_ARB_point_sprite */};/** * Polygon attribute group (GL_POLYGON_BIT). */struct gl_polygon_attrib{   GLenum FrontFace;		/**< Either GL_CW or GL_CCW */   GLenum FrontMode;		/**< Either GL_POINT, GL_LINE or GL_FILL */   GLenum BackMode;		/**< Either GL_POINT, GL_LINE or GL_FILL */   GLboolean _FrontBit;		/**< 0=GL_CCW, 1=GL_CW */   GLboolean CullFlag;		/**< Culling on/off flag */   GLboolean SmoothFlag;	/**< True if GL_POLYGON_SMOOTH is enabled */   GLboolean StippleFlag;	/**< True if GL_POLYGON_STIPPLE is enabled */   GLenum CullFaceMode;		/**< Culling mode GL_FRONT or GL_BACK */   GLfloat OffsetFactor;	/**< Polygon offset factor, from user */   GLfloat OffsetUnits;		/**< Polygon offset units, from user */   GLboolean OffsetPoint;	/**< Offset in GL_POINT mode */   GLboolean OffsetLine;	/**< Offset in GL_LINE mode */   GLboolean OffsetFill;	/**< Offset in GL_FILL mode */};/** * Scissor attributes (GL_SCISSOR_BIT). */struct gl_scissor_attrib{   GLboolean Enabled;		/**< Scissor test enabled? */   GLint X, Y;			/**< Lower left corner of box */   GLsizei Width, Height;	/**< Size of box */};/** * Stencil attribute group (GL_STENCIL_BUFFER_BIT). */struct gl_stencil_attrib{   GLboolean Enabled;		/**< Enabled flag */   GLboolean TestTwoSide;	/**< GL_EXT_stencil_two_side */   GLubyte ActiveFace;		/**< GL_EXT_stencil_two_side (0 or 1) */   GLboolean _TestTwoSide;   GLenum Function[2];		/**< Stencil function */   GLenum FailFunc[2];		/**< Fail function */   GLenum ZPassFunc[2];		/**< Depth buffer pass function */   GLenum ZFailFunc[2];		/**< Depth buffer fail function */   GLint Ref[2];		/**< Reference value */   GLuint ValueMask[2];		/**< Value mask */   GLuint WriteMask[2];		/**< Write mask */   GLuint Clear;		/**< Clear value */};#define NUM_TEXTURE_TARGETS 5   /* 1D, 2D, 3D, CUBE and RECT *//** * An index for each type of texture object *//*@{*/#define TEXTURE_1D_INDEX    0#define TEXTURE_2D_INDEX    1#define TEXTURE_3D_INDEX    2#define TEXTURE_CUBE_INDEX  3#define TEXTURE_RECT_INDEX  4/*@}*//** * Bit flags for each type of texture object * Used for Texture.Unit[]._ReallyEnabled flags. *//*@{*/#define TEXTURE_1D_BIT   (1 << TEXTURE_1D_INDEX)#define TEXTURE_2D_BIT   (1 << TEXTURE_2D_INDEX)#define TEXTURE_3D_BIT   (1 << TEXTURE_3D_INDEX)#define TEXTURE_CUBE_BIT (1 << TEXTURE_CUBE_INDEX)#define TEXTURE_RECT_BIT (1 << TEXTURE_RECT_INDEX)/*@}*//** * TexGenEnabled flags. *//*@{*/#define S_BIT 1#define T_BIT 2#define R_BIT 4#define Q_BIT 8/*@}*//** * Bit flag versions of the corresponding GL_ constants. *//*@{*/#define TEXGEN_SPHERE_MAP        0x1#define TEXGEN_OBJ_LINEAR        0x2#define TEXGEN_EYE_LINEAR        0x4#define TEXGEN_REFLECTION_MAP_NV 0x8#define TEXGEN_NORMAL_MAP_NV     0x10#define TEXGEN_NEED_NORMALS      (TEXGEN_SPHERE_MAP        | \				  TEXGEN_REFLECTION_MAP_NV | \				  TEXGEN_NORMAL_MAP_NV)#define TEXGEN_NEED_EYE_COORD    (TEXGEN_SPHERE_MAP        | \				  TEXGEN_REFLECTION_MAP_NV | \				  TEXGEN_NORMAL_MAP_NV     | \				  TEXGEN_EYE_LINEAR)/*@}*//* A selection of state flags to make driver and module's lives easier. */#define ENABLE_TEXGEN0        0x1#define ENABLE_TEXGEN1        0x2#define ENABLE_TEXGEN2        0x4#define ENABLE_TEXGEN3        0x8#define ENABLE_TEXGEN4        0x10#define ENABLE_TEXGEN5        0x20#define ENABLE_TEXGEN6        0x40#define ENABLE_TEXGEN7        0x80#define ENABLE_TEXMAT0        0x1	/* Ie. not the identity matrix */#define ENABLE_TEXMAT1        0x2#define ENABLE_TEXMAT2        0x4#define ENABLE_TEXMAT3        0x8#define ENABLE_TEXMAT4        0x10#define ENABLE_TEXMAT5        0x20#define ENABLE_TEXMAT6        0x40#define ENABLE_TEXMAT7        0x80#define ENABLE_TEXGEN(i) (ENABLE_TEXGEN0 << (i))#define ENABLE_TEXMAT(i) (ENABLE_TEXMAT0 << (i))/** * Texel fetch function prototype.  We use texel fetch functions to * extract RGBA, color indexes and depth components out of 1D, 2D and 3D * texture images.  These functions help to isolate us from the gritty * details of all the various texture image encodings. *  * \param texImage texture image. * \param col texel column. * \param row texel row. * \param img texel image level/layer. * \param texelOut output texel (up to 4 GLchans) */typedef void (*FetchTexelFuncC)( const struct gl_texture_image *texImage,                                 GLint col, GLint row, GLint img,                                 GLchan *texelOut );/** * As above, but returns floats. * Used for depth component images and for upcoming signed/float * texture images. */typedef void (*FetchTexelFuncF)( const struct gl_texture_image *texImage,                                 GLint col, GLint row, GLint img,                                 GLfloat *texelOut );typedef void (*StoreTexelFunc)(struct gl_texture_image *texImage,                               GLint col, GLint row, GLint img,                               const void *texel);/** * TexImage store function.  This is called by the glTex[Sub]Image * functions and is responsible for converting the user-specified texture * image into a specific (hardware) image format. */typedef GLboolean (*StoreTexImageFunc)(GLcontext *ctx, GLuint dims,                          GLenum baseInternalFormat,                          const struct gl_texture_format *dstFormat,                          GLvoid *dstAddr,                          GLint dstXoffset, GLint dstYoffset, GLint dstZoffset,                          GLint dstRowStride, GLint dstImageStride,                          GLint srcWidth, GLint srcHeight, GLint srcDepth,                          GLenum srcFormat, GLenum srcType,                          const GLvoid *srcAddr,                          const struct gl_pixelstore_attrib *srcPacking);/** * Texture format record  */struct gl_texture_format{   GLint MesaFormat;		/**< One of the MESA_FORMAT_* values */   GLenum BaseFormat;		/**< Either GL_RGB, GL_RGBA, GL_ALPHA,				 *   GL_LUMINANCE, GL_LUMINANCE_ALPHA,				 *   GL_INTENSITY, GL_COLOR_INDEX or				 *   GL_DEPTH_COMPONENT.				 */   GLenum DataType;		/**< GL_FLOAT or GL_UNSIGNED_NORMALIZED_ARB */   GLubyte RedBits;		/**< Bits per texel component */   GLubyte GreenBits;		/**< These are just rough approximations for */   GLubyte BlueBits;		/**< compressed texture formats. */   GLubyte AlphaBits;   GLubyte LuminanceBits;   GLubyte IntensityBits;   GLubyte IndexBits;   GLubyte DepthBits;   GLubyte StencilBits; 	/**< GL_EXT_packed_depth_stencil */   GLuint TexelBytes;		/**< Bytes per texel, 0 if compressed format */   StoreTexImageFunc StoreImage;   /**    * \name Texel fetch function pointers    */   /*@{*/   FetchTexelFuncC FetchTexel1D;   FetchTexelFuncC FetchTexel2D;   FetchTexelFuncC FetchTexel3D;   FetchTexelFuncF FetchTexel1Df;   FetchTexelFuncF FetchTexel2Df;   FetchTexelFuncF FetchTexel3Df;   /*@}*/   StoreTexelFunc StoreTexel;};/** * Texture image state.  Describes the dimensions of a texture image, * the texel format and pointers to Texel Fetch functions. */struct gl_texture_image{   GLenum _BaseFormat;		/**< Either GL_RGB, GL_RGBA, GL_ALPHA,				 *   GL_LUMINANCE, GL_LUMINANCE_ALPHA,				 *   GL_INTENSITY, GL_COLOR_INDEX,				 *   GL_DEPTH_COMPONENT or GL_DEPTH_STENCIL_EXT                                 *   only. Used for choosing TexEnv arithmetic.				 */   GLint InternalFormat;	/**< Internal format as given by the user */   GLuint Border;		/**< 0 or 1 */   GLuint Width;		/**< = 2^WidthLog2 + 2*Border */   GLuint Height;		/**< = 2^HeightLog2 + 2*Border */   GLuint Depth;		/**< = 2^DepthLog2 + 2*Border */   GLuint RowStride;		/**< == Width unless IsClientData and padded */   GLuint ImageStride;          /**< Stride between images, in texels */   GLuint Width2;		/**< = Width - 2*Border */   GLuint Height2;		/**< = Height - 2*Border */   GLuint Depth2;		/**< = Depth - 2*Border */   GLuint WidthLog2;		/**< = log2(Width2) */   GLuint HeightLog2;		/**< = log2(Height2) */   GLuint DepthLog2;		/**< = log2(Depth2) */   GLuint MaxLog2;		/**< = MAX(WidthLog2, HeightLog2) */   GLfloat WidthScale;		/**< used for mipmap LOD computation */   GLfloat HeightScale;		/**< used for mipmap LOD computation */   GLfloat DepthScale;		/**< used for mipmap LOD computation */   GLvoid *Data;		/**< Image data, accessed via FetchTexel() */   GLboolean IsClientData;	/**< Data owned by client? */   GLboolean _IsPowerOfTwo;	/**< Are all dimensions powers of two? */   const struct gl_texture_format *TexFormat;   struct gl_texture_object *TexObject;  /**< Pointer back to parent object */   FetchTexelFuncC FetchTexelc;	/**< GLchan texel fetch function pointer */   FetchTexelFuncF FetchTexelf;	/**< Float texel fetch function pointer */   GLboolean IsCompressed;	/**< GL_ARB_texture_compression */   GLuint CompressedSize;	/**< GL_ARB_texture_compression */   /**    * \name For device driver:    */   /*@{*/   void *DriverData;		/**< Arbitrary device driver data */   /*@}*/};/** * Indexes for cube map faces. *//*@{*/#define FACE_POS_X   0#define FACE_NEG_X   1#define FACE_POS_Y   2#define FACE_NEG_Y   3#define FACE_POS_Z   4#define FACE_NEG_Z   5#define MAX_FACES  6/*@}*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -