예제 #1
0
void ParsePaths()
{
	proxyDllW = (LPCWSTR)malloc(512*sizeof(wchar_t));

	ProxyHelper helper = ProxyHelper();
	dllDir = _strdup(helper.GetPath("bin\\").c_str());
	proxyDll = _strdup(helper.GetPath("bin\\d3d9.dll").c_str());
	mbstowcs_s(NULL, (wchar_t*)proxyDllW, 512, proxyDll, 512);
}
예제 #2
0
void ParsePaths()
{
	dllDir = (LPCSTR)malloc(512*sizeof(char));
	proxyDll = (LPCSTR)malloc(512*sizeof(char));
	proxyDllW = (LPCWSTR)malloc(512*sizeof(wchar_t));

	ProxyHelper helper = ProxyHelper();
	helper.GetPath((char*)dllDir, "bin\\");
	helper.GetPath((char*)proxyDll, "bin\\d3d9.dll");
	mbstowcs_s(NULL, (wchar_t*)proxyDllW, 512, proxyDll, 512);
}
예제 #3
0
/**
* Loads stereo mode effect file.
***/
void StereoView::InitShaderEffects()
{
	shaderEffect[ANAGLYPH_RED_CYAN] = "AnaglyphRedCyan.fx";
	shaderEffect[ANAGLYPH_RED_CYAN_GRAY] = "AnaglyphRedCyanGray.fx";
	shaderEffect[ANAGLYPH_YELLOW_BLUE] = "AnaglyphYellowBlue.fx";
	shaderEffect[ANAGLYPH_YELLOW_BLUE_GRAY] = "AnaglyphYellowBlueGray.fx";
	shaderEffect[ANAGLYPH_GREEN_MAGENTA] = "AnaglyphGreenMagenta.fx";
	shaderEffect[ANAGLYPH_GREEN_MAGENTA_GRAY] = "AnaglyphGreenMagentaGray.fx";
	shaderEffect[SIDE_BY_SIDE] = "SideBySide.fx";
	shaderEffect[DIY_RIFT] = "SideBySideRift.fx";
	shaderEffect[OVER_UNDER] = "OverUnder.fx";
	shaderEffect[INTERLEAVE_HORZ] = "InterleaveHorz.fx";
	shaderEffect[INTERLEAVE_VERT] = "InterleaveVert.fx";
	shaderEffect[CHECKERBOARD] = "Checkerboard.fx";

	char viewPath[512];
	ProxyHelper helper = ProxyHelper();
	helper.GetPath(viewPath, "fx\\");

	strcat_s(viewPath, 512, shaderEffect[stereo_mode].c_str());

	if (FAILED(D3DXCreateEffectFromFile(m_pActualDevice, viewPath, NULL, NULL, D3DXFX_DONOTSAVESTATE, NULL, &viewEffect, NULL))) {
		OutputDebugString("Effect creation failed\n");
	}
}
예제 #4
0
void OculusRiftView::InitShaderEffects()
{
	shaderEffect[OCULUS_RIFT] = "OculusRift.fx";
	shaderEffect[OCULUS_RIFT_CROPPED] = "OculusRiftCropped.fx";

	char viewPath[512];
	ProxyHelper helper = ProxyHelper();
	helper.GetPath(viewPath, "fx\\");

	strcat_s(viewPath, 512, shaderEffect[stereo_mode].c_str());

	D3DXCreateEffectFromFile(device, viewPath, NULL, NULL, 0, NULL, &viewEffect, NULL);
}
예제 #5
0
void StereoView::InitShaderEffects()
{
	
	shaderEffect[SIDE_BY_SIDE] = "SideBySide.fx";

	char viewPath[512];
	ProxyHelper helper = ProxyHelper();
	helper.GetPath(viewPath, "fx\\");

	strcat_s(viewPath, 512, shaderEffect[stereo_mode].c_str());

	if (FAILED(D3DXCreateEffectFromFile(m_pActualDevice, viewPath, NULL, NULL, D3DXFX_DONOTSAVESTATE, NULL, &viewEffect, NULL))) {
		OutputDebugString("Effect creation failed\n");
	}
}
예제 #6
0
/**
* Loads Oculus Rift shader effect files.
***/ 
void OculusRiftView::InitShaderEffects()
{
	//Currently, RiftUp DK1 and DK2 share the same shader effects
	shaderEffect[RIFTUP] = "OculusRift.fx";
	shaderEffect[OCULUS_RIFT_DK1] = "OculusRift.fx";
	shaderEffect[OCULUS_RIFT_DK1_CROPPED] = "OculusRiftCropped.fx";
	shaderEffect[OCULUS_RIFT_DK2] = "OculusRiftDK2.fx";
	shaderEffect[OCULUS_RIFT_DK2_CROPPED] = "OculusRiftDK2Cropped.fx";

	char viewPath[512];
	ProxyHelper helper = ProxyHelper();
	helper.GetPath(viewPath, "fx\\");

	strcat_s(viewPath, 512, shaderEffect[stereo_mode].c_str());

	D3DXCreateEffectFromFile(m_pActualDevice, viewPath, NULL, NULL, 0, NULL, &viewEffect, NULL);
}
예제 #7
0
파일: Main.cpp 프로젝트: unclok/Perception
	frame_window(LPCSTR window_class_identity) : window_class_name(window_class_identity) {         
		int screen_width = GetSystemMetrics(SM_CXFULLSCREEN);  
		int screen_height = GetSystemMetrics(SM_CYFULLSCREEN);  
		instance_handle = GetModuleHandle(NULL);  

		WNDCLASS window_class = { CS_OWNDC, main_window_proc, 0, 0,    
			instance_handle, NULL,    
			NULL, NULL, NULL,    
			window_class_name };   

		window_class.hIcon = LoadIcon(instance_handle, MAKEINTRESOURCE(IDI_ICON_BIG));

		RegisterClass(&window_class);   
		window_handle = CreateWindowEx(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_TOPMOST,    
			window_class_name,    
			"Vireio Perception", 
			WS_OVERLAPPEDWINDOW & ~(WS_THICKFRAME | WS_MAXIMIZEBOX), 
			//WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,   
			(screen_width-585)/2, (screen_height-240)/2, 
			585, 270,
			NULL, NULL, instance_handle, NULL);
		SetWindowLongPtr(window_handle, GWL_USERDATA, (LONG)this);  
		GetClientRect(window_handle, &client_rectangle);
		int width = client_rectangle.right - client_rectangle.left;
		int height = client_rectangle.bottom - client_rectangle.top;
		text = new static_control(instance_handle, window_handle);
		combobox = new combobox_control(instance_handle, window_handle, text, 20, 81, 1001);
		combobox2 = new combobox_control(instance_handle, window_handle, text, 20, 115, 1002);
		combobox3 = new combobox_control(instance_handle, window_handle, text, 20, 149, 1003);

		ProxyHelper helper = ProxyHelper();
		std::string viewPath = helper.GetPath("img\\logo.bmp");

		logo_bitmap = (HBITMAP)LoadImage(NULL,viewPath.c_str(),IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
		OutputDebugString("Load the bitmap\n");

		ProxyConfig cfg;
		helper.LoadUserConfig(cfg, oculusProfile);

		SetCursor(LoadCursor(NULL, IDC_ARROW)); 
		ShowWindow(window_handle, SW_SHOW);   
		UpdateWindow(window_handle); 

		//Refresh on timer for FPS readings
		SetTimer(window_handle, 1, 500, NULL);
	}