Render frame in dual screen (fullscreen mode)
Members - Reputation: 101
Posted 10 August 2012 - 12:10 PM
I’d like to render frame on D3D9 using two screens in fullscreen mode.
For example :
I have two screens resolution 1024x768.
So I’d like to render frame in 2048 x 768 same time on two screens.
How must I program based on D3D9?
I tried somethings, but I don't find the soluce.
Here is some my code :
[source lang="cpp"]#define SCREEN_WIDTH 2048#define SCREEN_HEIGHT 768[/source]
[source lang="cpp"]ZeroMemory(&wc, sizeof(WNDCLASSEX)); wc.cbSize = sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)WindowProc; wc.hInstance = hInstance; wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.lpszClassName = L"WindowClass"; RegisterClassEx(&wc); hWnd = CreateWindowEx(NULL, L"WindowClass", L"Our Direct3D Program", WS_EX_TOPMOST | WS_POPUP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, NULL, NULL, hInstance, NULL);[/source]
[source lang="cpp"]d3d = Direct3DCreate9(D3D_SDK_VERSION);D3DPRESENT_PARAMETERS d3dpp;ZeroMemory(&d3dpp, sizeof(d3dpp));d3dpp.Windowed = FALSE;d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;d3dpp.hDeviceWindow = hWnd;d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;d3dpp.BackBufferWidth = SCREEN_WIDTH;d3dpp.BackBufferHeight = SCREEN_HEIGHT;d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &d3ddev);[/source]
Members - Reputation: 568
Posted 13 August 2012 - 07:32 AM
You could use Dx in non-fullscreen exlusive mode, where you just have one large window with no borders that covers the entire screen (e.g. WoW and Eve have this as an option). Then you would only need one device.
Edited by turch, 13 August 2012 - 07:33 AM.