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

📄 mtypes.h

📁 Mesa is an open-source implementation of the OpenGL specification - a system for rendering interacti
💻 H
📖 第 1 页 / 共 5 页
字号:
   /**    * Must flush FLUSH_VERTICES before referencing:    */   /*@{*/   struct gl_material Material; 	/**< Includes front & back values */   /*@}*/   GLboolean Enabled;			/**< Lighting enabled flag */   GLenum ShadeModel;			/**< GL_FLAT or GL_SMOOTH */   GLenum ColorMaterialFace;		/**< GL_FRONT, BACK or FRONT_AND_BACK */   GLenum ColorMaterialMode;		/**< GL_AMBIENT, GL_DIFFUSE, etc */   GLbitfield ColorMaterialBitmask;	/**< bitmask formed from Face and Mode */   GLboolean ColorMaterialEnabled;   GLenum ClampVertexColor;   struct gl_light EnabledList;         /**< List sentinel */   /**     * Derived state for optimizations:     */   /*@{*/   GLboolean _NeedEyeCoords;		   GLboolean _NeedVertices;		/**< Use fast shader? */   GLbitfield  _Flags;		        /**< LIGHT_* flags, see above */   GLfloat _BaseColor[2][3];   /*@}*/};/** * Line attribute group (GL_LINE_BIT). */struct gl_line_attrib{   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 */};/** * 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 _Enabled;   /**< true if Enabled and multisample buffer */   GLboolean SampleAlphaToCoverage;   GLboolean SampleAlphaToOne;   GLboolean SampleCoverage;   GLfloat SampleCoverageValue;   GLboolean SampleCoverageInvert;};/** * A pixelmap (see glPixelMap) */struct gl_pixelmap{   GLint Size;   GLfloat Map[MAX_PIXEL_MAP_TABLE];   GLubyte Map8[MAX_PIXEL_MAP_TABLE];  /**< converted to 8-bit color */};/** * Collection of all pixelmaps */struct gl_pixelmaps{   struct gl_pixelmap RtoR;  /**< i.e. GL_PIXEL_MAP_R_TO_R */   struct gl_pixelmap GtoG;   struct gl_pixelmap BtoB;   struct gl_pixelmap AtoA;   struct gl_pixelmap ItoR;   struct gl_pixelmap ItoG;   struct gl_pixelmap ItoB;   struct gl_pixelmap ItoA;   struct gl_pixelmap ItoI;   struct gl_pixelmap StoS;};/** * Pixel attribute group (GL_PIXEL_MODE_BIT). */struct gl_pixel_attrib{   GLenum ReadBuffer;		/**< source buffer for glRead/CopyPixels() */   /*--- Begin Pixel Transfer State ---*/   /* Fields are in the order in which they're applied... */   /* Scale & Bias (index shift, offset) */   GLfloat RedBias, RedScale;   GLfloat GreenBias, GreenScale;   GLfloat BlueBias, BlueScale;   GLfloat AlphaBias, AlphaScale;   GLfloat DepthBias, DepthScale;   GLint IndexShift, IndexOffset;   /* Pixel Maps */   /* Note: actual pixel maps are not part of this attrib group */   GLboolean MapColorFlag;   GLboolean MapStencilFlag;   /* There are multiple color table stages: */   GLboolean ColorTableEnabled[COLORTABLE_MAX];   GLfloat ColorTableScale[COLORTABLE_MAX][4];  /**< RGBA */   GLfloat ColorTableBias[COLORTABLE_MAX][4];   /**< RGBA */   /* Convolution (GL_EXT_convolution) */   GLboolean Convolution1DEnabled;   GLboolean Convolution2DEnabled;   GLboolean Separable2DEnabled;   GLfloat ConvolutionBorderColor[3][4];   GLenum ConvolutionBorderMode[3];   GLfloat ConvolutionFilterScale[3][4];  /**< RGBA */   GLfloat ConvolutionFilterBias[3][4];   /**< RGBA */   GLfloat PostConvolutionScale[4];  /**< RGBA */   GLfloat PostConvolutionBias[4];   /**< RGBA */   /* Color matrix (GL_SGI_color_matrix) */   /* Note: the color matrix is not part of this attrib group */   GLfloat PostColorMatrixScale[4];  /**< RGBA */   GLfloat PostColorMatrixBias[4];   /**< RGBA */   /* Histogram & minmax (GL_EXT_histogram) */   /* Note: histogram and minmax data are not part of this attrib group */   GLboolean HistogramEnabled;   GLboolean MinMaxEnabled;   /*--- End Pixel Transfer State ---*/   /* Pixel Zoom */   GLfloat ZoomX, ZoomY;   /** GL_SGI_texture_color_table */   GLfloat TextureColorTableScale[4];   GLfloat TextureColorTableBias[4];};/** * 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 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/ARB_point_sprite */   GLboolean CoordReplace[MAX_TEXTURE_COORD_UNITS]; /**< GL_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 7   /* 1D, 2D, 3D, CUBE, RECT, 1D_STACK, and 2D_STACK *//** * 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#define TEXTURE_1D_ARRAY_INDEX 5#define TEXTURE_2D_ARRAY_INDEX 6/*@}*//** * 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)#define TEXTURE_1D_ARRAY_BIT (1 << TEXTURE_1D_ARRAY_INDEX)#define TEXTURE_2D_ARRAY_BIT (1 << TEXTURE_2D_ARRAY_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);/** * This macro defines the (many) parameters to the texstore functions. * \param dims  either 1 or 2 or 3 * \param baseInternalFormat  user-specified base internal format * \param dstFormat  destination Mesa texture format * \param dstAddr  destination image address * \param dstX/Y/Zoffset  destination x/y/z offset (ala TexSubImage), in texels * \param dstRowStride  destination image row stride, in bytes * \param dstImageOffsets  offset of each 2D slice within 3D texture, in texels * \param srcWidth/Height/Depth  source image size, in pixels * \param srcFormat  incoming image format * \param srcType  incoming image data type * \param srcAddr  source image address * \param srcPacking  source image packing parameters */#define TEXSTORE_PARAMS \	GLcontext *ctx, GLuint dims, \	GLenum baseInternalFormat, \	const struct gl_texture_format *dstFormat, \	GLvoid *dstAddr, \	GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, \	GLint dstRowStride, const GLuint *dstImageOffsets, \	GLint srcWidth, GLint srcHeight, GLint srcDepth, \	GLenum srcFormat, GLenum srcType, \	const GLvoid *srcAddr, \	const struct gl_pixelstore_attrib *srcPacking/** * Texture image storage function. */typedef GLboolean (*StoreTexImageFunc)(TEXSTORE_PARAMS);/** * 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 */   /**    * Bits per texel component.  These are just rough approximations    * for compressed texture formats.    */   /*@{*/   GLubyte RedBits;   GLubyte GreenBits;   GLubyte BlueBits;   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;

⌨️ 快捷键说明

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