Jump to content

  • Log In with Google      Sign In   
  • Create Account


Render frame in dual screen (fullscreen mode)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Chrisoft   Members   -  Reputation: 101

Like
0Likes
Like

Posted 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]


Regards,
Chrisoft.

Sponsor:

#2 turch   Members   -  Reputation: 590

Like
0Likes
Like

Posted 13 August 2012 - 07:32 AM

AFAIK, the only way to render to two screens with Dx9 is to create two separate, fullscreen devices. You would have to duplicate all resources on both devices. When rendering, you draw with each device, with the view matrices adjusted so that each monitor is drawing half of the full view.

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.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS