📄 state.h
字号:
/**************************************************************************
* Name : state.h
* Author : BCB
* Created : 02/05/2003
*
* Copyright : 2003 by Imagination Technologies Limited. All rights reserved.
* : No part of this software, either material or conceptual
* : may be copied or distributed, transmitted, transcribed,
* : stored in a retrieval system or translated into any
* : human or computer language in any form by any means,
* : electronic, mechanical, manual or other-wise, or
* : disclosed to third parties without the express written
* : permission of Imagination Technologies Limited, Unit 8, HomePark
* : Industrial Estate, King's Langley, Hertfordshire,
* : WD4 8LZ, U.K.
*
* Platform : ANSI
*
* $Date: 2004/10/06 13:44:18 $ $Revision: 1.11.1.1 $
* $Log: state.h $
**************************************************************************/
#ifndef _STATE_
#define _STATE_
typedef struct GLESpointStateRec {
IMG_FLOAT *pfPointSize;
IMG_FLOAT fSmoothSize;
IMG_FLOAT fAliasedSize;
IMG_FLOAT fRequestedSize;
} GLESpointState;
typedef struct GLESlineStateRec {
IMG_FLOAT *pfLineWidth;
IMG_FLOAT fSmoothWidth;
IMG_FLOAT fAliasedWidth;
} GLESlineState;
typedef struct GLESpolygonStateRec {
GLenum eCullMode;
GLenum eFrontFaceDirection;
/*
** Polygon offset state.
*/
IMG_UINT32 ui32DepthBias;
} GLESpolygonState;
typedef struct GLESdepthStateRec {
/*
** Depth buffer test function. The z value is compared using zFunction
** against the current value in the zbuffer. If the comparison
** succeeds the new z value is written into the z buffer masked
** by the z write mask.
*/
IMG_UINT32 ui32TestFunc;
/*
** Writemask enable. When GL_TRUE writing to the depth buffer is
** allowed.
*/
/* GLboolean writeEnable;
*
* Stored in ui32ISPTSPWord
*/
/*
** Value used to clear the z buffer when glClear is called.
*/
IMG_FLOAT fClear;
} GLESdepthState;
/*
** Stencil state. Contains all the user settable stencil state.
*/
typedef struct GLESstencilStateRec {
/*
** Do we need to store this? It is unusable...
*/
GLenum eTestFunc;
IMG_INT32 i32Clear;
IMG_UINT32 i32Reference;
IMG_UINT32 ui32Mask;
IMG_UINT32 ui32WriteMask;
GLenum eFail;
GLenum eDepthFail;
GLenum eDepthPass;
} GLESstencilState;
typedef struct GLESenableStateRec {
/* GLuint general; Covered by uRasterEnables, uTnLEnables
GLuint lights;*/
IMG_UINT32 aui32Texture[GLES_MAX_TEXTURE_UNITS];
} GLESenableState;
typedef struct GLESrasterStateRec {
/*
** Alpha function. The alpha function is applied to the alpha color
** value and the reference value. If it fails then the pixel is
** not rendered.
*/
IMG_UINT32 ui32AlphaFuncRef;
/*
** Alpha blending source and destination factors, blend op,
** and blend color.
*/
IMG_UINT32 ui32BlendSrcDst;
/*
** Logic op.
*/
IMG_UINT32 ui32LogicOp;
/*
** Color to fill the color portion of the framebuffer when clear
** is called.
*/
/* GLEScolor clear;
stored in HW format
*/
IMG_UINT32 ui32ClearColor;
/*
** RGB write masks.
*/
IMG_UINT32 ui32ColorMask;
} GLESrasterState;
#define GLES_HINT_PERSPECTIVE 0
#define GLES_HINT_POINTSMOOTH 1
#define GLES_HINT_LINESMOOTH 2
#define GLES_HINT_POLYSMOOTH 3
#define GLES_HINT_FOG 4
#define GLES_HINT_NUMHINTS 5
#define GLES_HINT_NOFASTPATH 0x00000000
#define GLES_HINT_NO_CLIPVOLUME 0x00000001
#define GLES_HINT_NO_VPTRANSFORM 0x00000002
/*
** Hint state. Contains all the user controllable hint state.
*/
typedef struct {
GLenum eHint[GLES_HINT_NUMHINTS];
IMG_UINT32 ui32FastPath;
} GLEShintState;
typedef struct GLEStextureStateRec {
/* Current active texture unit (stored as an index not an enum) */
IMG_UINT32 ui32ActiveTexture;
/* Pointer to current active texture unit */
GLEStextureUnitState *psActive;
/* Current state for all texture units */
GLEStextureUnitState asUnit[GLES_MAX_TEXTURE_UNITS];
} GLEStextureState;
/*
** Scissor state from user.
*/
typedef struct GLESscissorRec {
IMG_INT32 i32ScissorX, i32ScissorY;
IMG_UINT32 ui32ScissorWidth, ui32ScissorHeight;
} GLESscissor;
/*
** Multisample state
*/
typedef struct GLESmultisampleStateRec {
IMG_FLOAT fSampleCoverageValue;
IMG_BOOL bSampleCoverageInvert;
} GLESmultisampleState;
typedef struct GLESstateRec {
GLEScurrentState sCurrent;
GLESpointState sPoint;
GLESlineState sLine;
GLESpolygonState sPolygon;
GLESlightState sLight;
GLESfogState sFog;
GLESdepthState sDepth;
GLESstencilState sStencil;
GLESviewport sViewport;
GLenum eMatrixMode;
GLESenableState sEnables;
GLESrasterState sRaster;
GLEShintState sHints;
GLEStextureState sTexture;
GLESscissor sScissor;
GLESmultisampleState sMultisample;
#if defined(SUPPORT_VGP) || defined(SUPPORT_VGP_LITE)
GLESVertexProgramState sVertexProgram;
#endif
} GLESstate;
#endif /* _STATE_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -