Sign in to follow this  

How do I get window sizes bigger than my screen size?

This topic is 4763 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys! Im new to this forum and am quite new to DirectX. My problem now is this: I need a DirectX application that has a size bigger than the size of my screen. How can I get that? I tried the following: g_D3DSettings.m_nDeviceWidth = 1280; g_D3DSettings.m_nDeviceHeight = 1280; res = InitDirect3DDevice(hWnd, TRUE, g_D3DSettings, g_pD3D, &g_pDevice); Additionally I tried to take care of that in the Windows CreateWindow() function like that: g_hWnd = CreateWindow(strAppname, strAppname, WS_OVERLAPPEDWINDOW, 0, 0, 1280, 1280, NULL, NULL, wc.hInstance, NULL); But unfortunately my application crashes with an error that sounds like I havent got enough memory for the screen buffer/back buffer.... What can I do to get this running? Thx in advance, Nick.

Share this post


Link to post
Share on other sites
Generally, 3d adapters only support an array of pre-determined fullscreen resolutions, that can be retrieved by using methods of the IDirect3D* interface. Furthermore, I can imagine that Windows isn't too happy about the window being larger than the screen in the first place, whether or not you use d3d!

What are you trying to accomplish?

Share this post


Link to post
Share on other sites
Oh yeah, I forgot about that. Most cards won't do 1280x1280.. 1280x960 or 1280x1024 is more normal, and more people's monitors will support it.

As for device windows being larger than the desktop resolution, windows xp doesn't seem to mind for me.

Share this post


Link to post
Share on other sites
Quote:
What are you trying to accomplish?


I need a DX window that is quadratic and bigger than the screen (resolutions >= 1280x1280).

To the other poster: Yes I registered my window class. Furthermore I found the place where i initialize the size of my backbuffer and tried to adapt that as well, but it still didnt work:

d3dpp.BackBufferWidth = 1280;
d3dpp.BackBufferHeight = 1280;

Share this post


Link to post
Share on other sites
Quote:
Original post by MrEvil
Oh yeah, I forgot about that. Most cards won't do 1280x1280.. 1280x960 or 1280x1024 is more normal, and more people's monitors will support it.

As for device windows being larger than the desktop resolution, windows xp doesn't seem to mind for me.


1024x1024 would be fine too. Besides that, my DX application is running in full screen mode, thus it's not that much a Windows thing, but actually only a DX thing. If DX could display fullscreen applications with such a resolution, I'd be happy :).

Anyone knows how this can be done?

Share this post


Link to post
Share on other sites
1024 x 1024 might be possible. I suppose it depends if the user of the program has configured their system properly. E.g. my monitor doesn't report that it can do 1024 x 1024, although it is perfectly capable of doing so, and I've had to use the nVidia control panel to add the 1024x1024 resolution.

Share this post


Link to post
Share on other sites
It probably can't be done. When I was working with DirectX, you could enumerate all resolutions your graphic card supports. Unless you pick one of those, it will never work. I assume this facility is still there. However, I would be really surprised if any standard consumer card supported square resolutions like that.

All in all, I'm rather at a loss why you would need this. Your monitor wouldn't be good at displaying those resoultions anyway. Unless your monitor can display things with an aspect ratio of 1:1 (which would surprise me too for standard hardware), you would be unable to display a resolution like that anyway.

Why don't you just do what people usually do when they have to display something that is bigger than the screen? Either pick the lowest resolution that can completely contain your square and render appropriate black bars on the sides, or implement some kind of scrolling and render only those portions which are currently visible.

Share this post


Link to post
Share on other sites
Quote:
Original post by MrEvil
1024 x 1024 might be possible. I suppose it depends if the user of the program has configured their system properly. E.g. my monitor doesn't report that it can do 1024 x 1024, although it is perfectly capable of doing so, and I've had to use the nVidia control panel to add the 1024x1024 resolution.


Are we talking about an actual resolution of 1024x1024 or about some kind of virtual desktop?

Share this post


Link to post
Share on other sites
It may be suitable for your purposes to create a render target texture the size of your needs instead of trying to force the primary framebuffer to a size that the card/monitor cannot support.

I assume that you need the data at the size you mentioned for offline processing. If this is not the case, you can still use the scene texture for normal rendering, using the actually supported backbuffer sizes.

EDIT: It should be mentioned, that any "DX thing" is very closely related, if not identical, to "Windows things". Resolution support is a hardware issue at heart, and both GDI and D3D both have to live with those.

Share this post


Link to post
Share on other sites

This topic is 4763 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this