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


C++ ProxyHelper::LoadGUIConfig方法代码示例

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


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

示例1: ProxyHelper

/**
* Create D3D device proxy. 
* First it creates the device, then it loads the game configuration
* calling the ProxyHelper class. Last it creates and returns the
* device proxy calling D3DProxyDeviceFactory::Get().
***/
HRESULT WINAPI BaseDirect3D9::CreateDevice(UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow,DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters,IDirect3DDevice9** ppReturnedDeviceInterface)
{
	// Create real interface
	HRESULT hResult = m_pD3D->CreateDevice(Adapter, DeviceType, hFocusWindow, BehaviorFlags,
		pPresentationParameters, ppReturnedDeviceInterface);
	if(FAILED(hResult))
		return hResult;

	OutputDebugString("[OK] Normal D3D device created\n");

	char buf[64];
	sprintf_s(buf, "Number of back buffers = %d\n", pPresentationParameters->BackBufferCount);
	OutputDebugString(buf);

	// load configuration file
	ProxyHelper helper = ProxyHelper();
	ProxyHelper::ProxyConfig cfg;
	ProxyHelper::OculusProfile oculusProfile;
	if(!helper.LoadConfig(cfg, oculusProfile)) {
		OutputDebugString("[ERR] Config loading failed, config could not be loaded. Returning normal D3DDevice. Vireio will not be active.\n");
		return hResult;
	}

	// load HUD/GUI settings
	helper.LoadHUDConfig(cfg);
	helper.LoadGUIConfig(cfg);

	OutputDebugString("[OK] Config loading - OK\n");

	if(cfg.stereo_mode == StereoView::DISABLED) {
		OutputDebugString("[WARN] stereo_mode == disabled. Returning normal D3DDevice. Vireio will not be active.\n");
		return hResult;
	}

	OutputDebugString("[OK] Stereo mode is enabled.\n");

	char buf1[32];
	LPCSTR psz = NULL;

	wsprintf(buf1,"Config type: %d", cfg.game_type);
	psz = buf1;
	OutputDebugString(psz);
	OutputDebugString("\n");

	// Create and return proxy
	*ppReturnedDeviceInterface = D3DProxyDeviceFactory::Get(cfg, *ppReturnedDeviceInterface, this);

	OutputDebugString("[OK] Vireio D3D device created.\n");

	return hResult;
}
开发者ID:HunLyxxod,项目名称:Perception,代码行数:57,代码来源:Direct3D9.cpp


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