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

📄 surface.h

📁 Lido PXA270平台开发板的最新BSP,包括源代码
💻 H
字号:
/******************************************************************************
<module>
* Name         : Surface.h
* Title        : D3DM Surface definition
* Author(s)    : Imagination Technologies
* Created      : 2 March 2004
*
* Copyright    : 2004 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.
*
* Description  : Definition of D3DM Context structure and related structures 
*				 and flags 
*
* Platform     : Windows CE
*
</module>
********************************************************************************/
#if !defined(_SURFACE_H_)
#define _SURFACE_H_

/***************************************************************************
* D3DM surface related flags 
****************************************************************************/

#define D3DM_SURFACE_FLAGS_PRIMARY					0x00000001
#define D3DM_SURFACE_FLAGS_MIPMAPSUBLEVEL			0x00000002
#define D3DM_SURFACE_FLAGS_OVERLAY					0x00000004
#define D3DM_SURFACE_FLAGS_PRIMARY_FLIP_CHAIN		0x00000008
#define D3DM_SURFACE_FLAGS_LAST_SUPPLIED_MIPMAP		0x00000010
#define D3DM_SURFACE_FLAGS_TWIDDLED					0x00000040
#define D3DM_SURFACE_FLAGS_SCENE_STARTED			0x00000080
#define D3DM_SURFACE_FLAGS_READ_ONLY_LOCK			0x00000100
#define D3DM_SURFACE_FLAGS_CREATE_Z_BUFFER			0x00000200
#define D3DM_SURFACE_FLAGS_GENERATE_MAP_ABOVE		0x00080000
#define D3DM_SURFACE_FLAGS_ALLOCATE_ZBUFFER			0x00100000

#define D3DM_SURFACE_CLEARFLAGS_FULLSCREEN_DEPTH	0x00000001
#define D3DM_SURFACE_CLEARFLAGS_FULLSCREEN_TARGET	0x00000002

/***************************************************************************
* D3DM Image Surface structure
****************************************************************************/

typedef struct _D3DM_SURFACE_
{
	/* Surface Type and usage*/
	D3DMRESOURCETYPE		eSurfaceType;
	DWORD					dwUsage;
	DWORD					dwFlags;

	LPD3DM_CONTEXT			psContext;		/* Pointer to context */
	HANDLE					hLockWait;		/* Surface locking Wait handle */
	PPVRSRV_MEM_INFO		psMemInfo;		/* FB mem allocation */

	/* Common description attributes */
	D3DMFORMAT				eFormat;		 /* D3DM format descriptor */
	DWORD					dwBpp;			 /* Bpp of surface format */
    D3DMMULTISAMPLE_TYPE	eMultiSampleType;/* Multisample Type */
	DWORD					dwWidth;		 /* Surface Width */
	DWORD					dwHeight;		 /* Surface Height */
	DWORD					dwStridePixel;	 /* Stride in pixels */
	DWORD					dwStrideByte;	 /* Stride in bytes */

	/*
		Next Write Op value for a colourfill blit. Allows correct
		synchronisation during complex scene
	*/
	DWORD					dwNextColourFillWriteOp;

	/* Type specific Description */
	struct 
	{
		/* Primary, Backbuffer and image surface description */
		struct
		{
			PVRSRV_TARENDERINFO		*psTARenderInfo;		/* PVR services render info */
			PVRSRV_PIXEL_FORMAT		ePVRFormat;				/* PVR format descriptor */
			PVRSRV_QUEUE_INFO		*psQueue;				/* Render target queue structure */
			DWORD					dwClearFlags;			/* Flags denoting current clear status */
			DWORD					dwFSRegionClip;			/* Fullscreen region clip word */
			IMG_BOOL				bSceneTADataSent;		/* Data Sent flag */
			struct _D3DM_SURFACE_	*psAssocDepthSurface;	/* Keeps track of system assigned associated depth buffers */
		}sSurface;

		/* Texture buffer description */
		struct
		{
			DWORD				dwTextureFormat;			/* Format of this texture map */
			PMAP_DETAILS		psMapDetails;				/* Mip Map Level details */
			LPD3DM_SURFACE		psNextLevel;				/* Next mipmap level surface */
			DWORD				dwMipMapLevel;				/* Mip Map Level this surface represents */
			DWORD				dwLevelOffset;				/* Offset into memory of this level */
			DWORD				dwScaledWidth;				/* Width scaled to minimum HW tex requirements */
			DWORD				dwScaledHeight;				/* Height scaled to minimum HW tex requirements */
			VOID				*pvTempLockSurface;			/* temporary lock surface pointer */
			RECT				sTempLockSurfaceRect;		/* temporary lock surface rect */
		}sTexture;

	}sDescription;

	struct _D3DM_SURFACE_		*psNext;
} D3DM_SURFACE, *LPD3DM_SURFACE;

/***************************************************************************
* D3DM Vertex Buffer structure
****************************************************************************/

typedef struct _D3DM_VBUFFER_
{
	/* Surface Type and usage*/
	D3DMRESOURCETYPE	eSurfaceType;
	DWORD				dwUsage;

	/* FVF Format descrption Flags */
	DWORD				dwFVFFlags;

	/* Data buffer pointer */
	VOID				*pvVertexData;

	/* Stride of vertex in DWORDs */
	DWORD				dwStrideDW;

	/* Buffer Size In DWORD's */
	DWORD				dwSizeDW;

#if defined (SUPPORT_VGP) || defined (SUPPORT_VGP_LITE)

	/* VGP Input format definition */ 
	VSIFDEF				sVSIFDef;

#endif

}D3DM_VBUFFER, *LPD3DM_VBUFFER;

/***************************************************************************
* D3DM Index Buffer structure
****************************************************************************/

typedef struct _D3DM_IBUFFER_
{
	/* Surface Type and usage*/
	D3DMRESOURCETYPE	eSurfaceType;
	DWORD				dwUsage;

	/* Buffer Format descrption */
	D3DMFORMAT			eFormat;

	/* Data buffer pointer */
	VOID				*pvIndexData;

	/* Stride of vertex in Bytes */
	DWORD				dwStrideByte;

	/* Buffer Size In Bytes */
	DWORD				dwSizeByte;

}D3DM_IBUFFER, *LPD3DM_IBUFFER;

IMG_BOOL ZLSAlloc(LPD3DM_CONTEXT psContext);
VOID CreateDepthBuffer(D3DM_CREATESURFACE_DATA *pcsd);
VOID DestroyDepthBuffer(D3DM_DESTROYSURFACE_DATA *pdsd);

#endif /* #if !defined(_SURFACE_H_) */
/*****************************************************************************
 End of file (Surface.h)
*****************************************************************************/

⌨️ 快捷键说明

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