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

📄 lights.h

📁 Lido PXA270平台开发板的最新BSP,包括源代码
💻 H
字号:
/******************************************************************************
<module>
* Name         : Lights.h
* Title        : Light creation and maintenance
* 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  : Tools for maintaining a list of D3D lights. Intended to
#				  hold all the lights associated with a given 3D context.
* Platform     : Windows CE
*
</module>

 $Log: lights.h $

*********************************************************************************/
#if !defined(_LIGHTS_H_)
#define _LIGHTS_H_

#define INVALID_LIGHT_INDEX 0xFFFFFFFF

/*****************************************************************************
 Structures and types
*****************************************************************************/

/*
	Flag definitions for LIGHTDATA::dwFlags
*/
#define LIGHTDATA_FLAGS_USED			0x00000001
#define LIGHTDATA_FLAGS_ENABLED			0x00000002
#define LIGHTDATA_FLAGS_DATA_CHANGED	0x00000004
#define LIGHTDATA_FLAGS_NEED_XFORM		0x00000008

/* Data for each created D3D light */
typedef struct _LIGHTDATA_
{
	/* General flags (see LIGHTDATA_FLAGS_xxx) */
	DWORD		dwFlags;

	/* Index number */
	DWORD		dwIndex;

	/* D3D light specification */
	PVR_LIGHT	sLightInfo;

	/* Light influence range squared */
	NTV_TYPE		RangeSquared;

	/* One over fCosThetaByTwo - fCosPhiByTwo */
	NTV_TYPE		InvThetaMinusPhi;

	/* Next Light in created light list */
	struct _LIGHTDATA_	*psNext;

} LIGHTDATA, *PLIGHTDATA;

/*****************************************************************************
 Prototypes
*****************************************************************************/
PLIGHTDATA GetLight(LPD3DM_CONTEXT psContext, DWORD dwIndex);
VOID CreateLight(LPD3DM_CONTEXT psContext, DWORD dwIndex);
VOID EnableLight(LPD3DM_CONTEXT psContext, PLIGHTDATA psLight);
VOID DisableLight(LPD3DM_CONTEXT psContext, PLIGHTDATA psLight);
VOID SetLightData(PLIGHTDATA		psLight, 
				  D3DMLIGHT			*psLightData, 
				  D3DMFORMAT		eDataFormat);
VOID UpdateLights(LPD3DM_CONTEXT psContext);

#endif /* #if !defined(_LIGHTS_H_) */
/*****************************************************************************
 End of file (Lights.h)
*****************************************************************************/

⌨️ 快捷键说明

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