Choosing a window size for D3D in windowed mode

What it says on the tin: a place to discuss proposed new features.
Post Reply
shilbert
Gnoblar
Posts: 12
Joined: Tue Jun 24, 2003 10:48 am
Location: Raleigh, NC
Contact:

Choosing a window size for D3D in windowed mode

Post by shilbert »

I was just looking at some of the OGRE demos on Windows (because I'm considering using OGRE myself), and I noticed that in the config dialog you couldn't choose a resolution for windowed mode with D3D. I hunted it down in the source, and apparently the D3D RenderSystems are all hardcoded to run in a 640x480 window if you turn the "Fullscreen" option off -- see D3D*RenderSystem::initialise() for the actual code. It's pretty limiting to have this hardcoded, as I almost always play games in windowed mode. I checked if RenderWindow::resize() could fix this post-window-creation but it turns out virtually none of those are fully implemented either. If I end up going with OGRE I'd be glad to write a patch for the hardcoding problem, but just to avoid redundancy, is anyone already planning on adding this in?
User avatar
bad_camel
Halfling
Posts: 74
Joined: Tue Dec 17, 2002 11:57 am
Location: Somerset, England
Contact:

Post by bad_camel »

? You should be able to choose screen size for any screen mode on any rendersystem, please check again.

What card drivers are you using?
Norondion
Gnoblar
Posts: 9
Joined: Sun Oct 27, 2002 2:03 pm
Location: Germany

Post by Norondion »

bad_camel wrote:? You should be able to choose screen size for any screen mode on any rendersystem, please check again.
No? See lines 424-441 of OgreD3D9RenderSystem.cpp
User avatar
cTh
Halfling
Posts: 81
Joined: Wed Dec 11, 2002 10:47 am
Location: Moscow/Russia

Post by cTh »

I'v submited already a patch wich do this in D3D9 render system...
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

..which I promise to sort out real soon now...
User avatar
bad_camel
Halfling
Posts: 74
Joined: Tue Dec 17, 2002 11:57 am
Location: Somerset, England
Contact:

Post by bad_camel »

Was this a dx9 thing, or for all d3d render systems? If so, would someone expllain this more to me please, as I understood it as you could not choose resolutions, which is rather strange
Norondion
Gnoblar
Posts: 9
Joined: Sun Oct 27, 2002 2:03 pm
Location: Germany

Post by Norondion »

In all D3D render systems you can only change the resolution for full screen mode. (windowed mode: always 640x480x[current colour depth])
shilbert
Gnoblar
Posts: 12
Joined: Tue Jun 24, 2003 10:48 am
Location: Raleigh, NC
Contact:

Post by shilbert »

cTh wrote:I'v submited already a patch wich do this in D3D9 render system...
Ah, I figured someone would already have taken care of it. From what I've seen the team has a really nice engine going here, keep up the good work :)
RoundSparrow
Greenskin
Posts: 145
Joined: Wed Jan 19, 2005 4:36 am
Location: Arica, Chile

Post by RoundSparrow »

Reviving an old thread...

Can anyone share experience with various platforms and resize of Windows? Can I create a Orge app that runs at 400x120 or some other non-standard resolution?

My main target is DirectX9 but any experience on this topic is appreciated.
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

RoundSparrow wrote:Can I create a Orge app that runs at 400x120 or some other non-standard resolution?
No, problem. Just call Root::initialise() with autoCreateWindow = false, and make your own call to RenderSystem::createRenderWindow().
Post Reply