当前位置: 首页>>代码示例>>C++>>正文


C++ MFPtrList::Init方法代码示例

本文整理汇总了C++中MFPtrList::Init方法的典型用法代码示例。如果您正苦于以下问题:C++ MFPtrList::Init方法的具体用法?C++ MFPtrList::Init怎么用?C++ MFPtrList::Init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MFPtrList的用法示例。


在下文中一共展示了MFPtrList::Init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: MFCollision_InitModule

MFInitStatus MFCollision_InitModule()
{
	gItemList.Init("Collision Items", 256);

	DebugMenu_AddItem("Show Collision", "Fuji Options", &gShowCollision, NULL, NULL);

	return MFAIC_Succeeded;
}
开发者ID:RemedyGameJam,项目名称:fuji,代码行数:8,代码来源:MFCollision.cpp

示例2: MFMaterial_InitModule

MFInitStatus MFMaterial_InitModule()
{
	MFCALLSTACK;

	gMaterialRegistry.Init("Material Registry", gDefaults.material.maxMaterialTypes);
	gMaterialDefList.Init("Material Definitions List", gDefaults.material.maxMaterialDefs);
	gMaterialList.Init("Material List", gDefaults.material.maxMaterials);

	DebugMenu_AddItem("Material Browser", "Fuji Options", &matBrowser);

	MFMat_Standard_Register();
	MFMat_Effect_Register();

	if(MFFileSystem_Exists("Materials.ini") && MFMaterial_AddDefinitionsFile("Materials", "Materials"))
	{
		MFDebug_Warn(3, "Failed to load Materials.ini");
	}
	
#if MF_RENDERER == MF_DRIVER_D3D11 || defined(MF_RENDERPLUGIN_D3D11)
	// HACK?
	MFTexture *pSysLogoLargeTexture = MFTexture_Create("_None");
	MFTexture *pSysLogoSmallTexture = MFTexture_Create("_None");
#else
	// create the logo textures from raw data
	MFTexture *pSysLogoLargeTexture = MFTexture_CreateFromRawData("SysLogoLarge", SysLogo256_data, SysLogo256_width, SysLogo256_height, (MFImageFormat)SysLogo256_format, SysLogo256_flags);
	MFTexture *pSysLogoSmallTexture = MFTexture_CreateFromRawData("SysLogoSmall", SysLogo64_data, SysLogo64_width, SysLogo64_height, (MFImageFormat)SysLogo64_format, SysLogo64_flags);
#endif

	// create standard materials
	pNoneMaterial = MFMaterial_Create("_None");
	pWhiteMaterial = MFMaterial_Create("_White");
	pSysLogoLarge = MFMaterial_Create("SysLogoLarge");
	pSysLogoSmall = MFMaterial_Create("SysLogoSmall");

	// disable backface cullign on the default materials
	MFMaterial_SetParameterI(pNoneMaterial, MFMatStandard_CullMode, 0, MFMatStandard_Cull_None);
	MFMaterial_SetParameterI(pWhiteMaterial, MFMatStandard_CullMode, 0, MFMatStandard_Cull_None);

	// release a reference to the logo textures
	MFTexture_Destroy(pSysLogoLargeTexture);
	MFTexture_Destroy(pSysLogoSmallTexture);

#if defined(_PSP)
	// create PSP specific stock materials
	MFTexture *pConnectedTexture = MFTexture_CreateFromRawData("connected", connected_data, connected_width, connected_height, (MFImageFormat)connected_format, connected_flags);
	MFTexture *pDisconnectedTexture = MFTexture_CreateFromRawData("disconnected", disconnected_data, disconnected_width, disconnected_height, (MFImageFormat)disconnected_format, disconnected_flags);
	MFTexture *pPowerTexture = MFTexture_CreateFromRawData("power", power_data, power_width, power_height, (MFImageFormat)power_format, power_flags);
	MFTexture *pChargingTexture = MFTexture_CreateFromRawData("charging", charging_data, charging_width, charging_height, (MFImageFormat)charging_format, charging_flags);
	MFTexture *pUSBTexture = MFTexture_CreateFromRawData("usb_icon", usb_icon_data, usb_icon_width, usb_icon_height, (MFImageFormat)usb_icon_format, usb_icon_flags);

	pConnected = MFMaterial_Create("connected");
	pDisconnected = MFMaterial_Create("disconnected");
	pPower = MFMaterial_Create("power");
	pCharging = MFMaterial_Create("charging");
	pUSB = MFMaterial_Create("usb_icon");

	MFTexture_Destroy(pConnectedTexture);
	MFTexture_Destroy(pDisconnectedTexture);
	MFTexture_Destroy(pPowerTexture);
	MFTexture_Destroy(pChargingTexture);
	MFTexture_Destroy(pUSBTexture);
#endif

	return MFAIC_Succeeded;
}
开发者ID:RemedyGameJam,项目名称:fuji,代码行数:65,代码来源:MFMaterial.cpp


注:本文中的MFPtrList::Init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。