Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 10 Aug 2012
Offline Last Active Aug 10 2012 05:15 PM

Topics I've Started

Render frame in dual screen (fullscreen mode)

10 August 2012 - 12:10 PM

Hello everybody,

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]