Jump to content
  • Advertisement
Sign in to follow this  
WaltN

[SlimDX] Compatibility with NVIDIA 3D Vision?

This topic is 2587 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

I'm a new-comer to SlimDX. I installed and rebuilt the three tutorials and a few sample programs without difficulty. However, I noticed that when I toggled to fullscreen mode it didn’t really fill the screen. It filled the height but not the full width. (It was forcing an aspect ratio less than my 16:9.)

I wondered if it didn’t have something to do with NVIDIA 3D Vision, since it was automatically enabling 3D upon toggling into fullscreen mode. I disabled 3D with NVIDIA Control Panel, and subsequently the screen was filled in fullscreen mode.

Does anyone know what's going on here? Perhaps it's the disabling of DXGI Alt+Enter handling?

I can’t tell if 3D Vision works with SlimDX (even with the screen not filled), because I do not yet have a program that implements 3D.

Walt

Share this post


Link to post
Share on other sites
Advertisement
I've been experimenting with 3D Vision myself. If you're going to use 3D VIsion automatic you simply need to hit CTRL+T and your glasses. There's a way of doing it automatically if you hook up some methods from NVAPI, but I've not yet attempted this as currently there's no managed port and it only supports DX10.


Each directx app can theoretically be supported by 3D vision automatic. 3D Vision automatic is not "true" stereoscopy: the driver itself will take care of duplicating the render calls from two different point of view. There's a hack that lets you control the stereoization process. The "NV_STEREO_IMAGE_SIGNATURE" method which consists in combining the eye-specific images into a texture twice the width and writing a special value in the last row and then presenting the results.This special value is picked up by the driver and it starts synchronizing this texture with the glases. I've tested it with DX9 and DX10 and it definitely works.

Share this post


Link to post
Share on other sites
Yep. I've read about all that. Haven't yet played around with it though. However, the way you introduced your second paragraph made me realized what the "hack" was all about.

What bothers me is that, in the second and third tutorial, if I Alt+Enter into full screen mode with Stereo enabled globally, the background doesn't really span full screen. There are vertical, black, sidebars. What's happening is that the tutorial's background fills only the height and is in the same 4:3 proportion as the window.

But, your comments led me to experiment a little more. I found that if I change the size of the window in window mode and toggle back and forth between windowed and fullscreen mode, resizing each time in windowed mode, eventually fullscreen mode fills the screen. I haven't yet discovered what I'm doing that triggers the thing to fill the screen. I'll keep at it.

One thing is sure. Stereo must be enabled in Nvidia Control Panel for anything to happen with 3D Vision. It is not necessary to hit Ctrl+t unless you've also got "Hide stereoscopic 3D effects when game starts" checked also.

Oh, another thing is sure: I need to learn a bit more about resizing control works in SlimDX. Even then, I may have to dig into the source code to figure out what's occuring with Alt+Enter.

Walt

Share this post


Link to post
Share on other sites
I'm not sure if switching to full-screen is supported in the SlimDX tutorial. I've been also been encountering some problems when implementing it. I keep getting a warning about "Full screen inefficiencies" no matter the order of my resizeBuffers/Target. Speaking of which, if anyone knows of any way to fix this.... Searching around it seems that it is a common problem. I'll have to see how it goes with DX11.



Anyway as far as I've read, 3D Vision is not (yet?) freely supported in Windowed mode. It seems that only a handful of applications have been greenlighted by nVidia to work in windowed mode. Google says that if you rename your app to "googleearth.exe" it may work in windowed mode.angry.gif



Share this post


Link to post
Share on other sites

I'm not sure if switching to full-screen is supported in the SlimDX tutorial. I've been also been encountering some problems when implementing it. I keep getting a warning about "Full screen inefficiencies" no matter the order of my resizeBuffers/Target. Speaking of which, if anyone knows of any way to fix this.... Searching around it seems that it is a common problem. I'll have to see how it goes with DX11.

Depends on what you mean by "supported." Toggling to fullscreen or windowed modes certainly works in Tutorial 2 ("Device Creation") and Tutorial 3 ("Simple Triangle"). Does that mean SlimDX stands behind those Tutorials? Probably not. Certainly not with regard to 3D Vision.


Anyway as far as I've read, 3D Vision is not (yet?) freely supported in Windowed mode. It seems that only a handful of applications have been greenlighted by nVidia to work in windowed mode. Google says that if you rename your app to "googleearth.exe" it may work in windowed mode.angry.gif


I was looking at some still shots from Civilization V on the web yesterday. (My browser is IE9.) I was suprised when my IR emitter turned on. I put the glasses on and turned them on, and, Voilla, 3D stills. The effect was good in the IE window, but switching from one shot to another was crude. It took a second or two, and with screen blanking. This was the first example of stereo in a window that I've seen.

Walt

Share this post


Link to post
Share on other sites
I just noticed the same problem in one of the DXSDK sample programs (BasicHLSL11). It doesn't fill the screen on an Alt+Enter. After I toggle back and forth between windowed and fullscreen mode, resizing the window with each iteration, eventually it fills the screen in fullscreen mode.

So, I guess SlimDX is off the hook.

Share this post


Link to post
Share on other sites

I just noticed the same problem in one of the DXSDK sample programs (BasicHLSL11). It doesn't fill the screen on an Alt+Enter. After I toggle back and forth between windowed and fullscreen mode, resizing the window with each iteration, eventually it fills the screen in fullscreen mode.

So, I guess SlimDX is off the hook.




I'm not sure if I understand your problem correctly. IIRC, in DX10/11 you'd write something like deviceContext.SetFullScreenState;(true) and resize buffers accordingly. After that line, it will switch to the "true" full screen mode. When you create your device you can also specify to ignore certain key combinations like Alt-Enter. Maybe the slimdx demos have done exactly that but did not implement the switching to full screen. By ignoring alt-enter you can handle it yourself manually and take all necessary precautions in an event-handler, instead of delegating it to Windows.

Share this post


Link to post
Share on other sites
I think you do understand the problem correctly. Basically, I need to see an example (either DX or SlimDX) that properly handles window (form) resizing and fullscreen/window toggling properly. By properly, I mean:

  1. Handles window resizing (both windowed and fullscreen toggling) that tracks the resolution change. (Rendering resolution increases when the window size increases, and vice versa.)
  2. Fullscreen toggling results in a rendering that fills the display screen with background replicated fully if scene elements do not occupy all of the window. (I would generally want scaling to be equal across x, y, and z, which I know how to achieve.)
  3. Full compatibility with NVIDIA 3D Vision. That is, although the rendering of the scene objects may change, the boilerplate should not change with and without 3D Vision.

None of the three SlimDX tutorials exhibit this behavior. Lacking the guidance of a tutorial, I've looked to the DX SDK. Unfortunately, few of the DX11 tutorials and samples are compatible with 3D Vision.

Some (e.g., BasicHLSL11) exhibit black vertical bars to fill out the width of the screen when Alt+Enter toggles into fullscreen mode. Many in this category, settle into a genuine fullscreen display and compatible with 3D Vision after an unpredicable number of window resizings while in windowed mode. Curiously, if you click the GUI "toggle" (as opposed to Alt+Enter), that behaves well, and, once done, the Alt+Enter behavior is proper.

Tutorial04 behaves properly on Alt+Enter, but there is no 3D effect. (There will probably be an explanation for this once I look at the code.) Tutorial05 behaves properly on Alt+Enter and exhibits 3D effects.

My approach will be to look at BasicHLSL11's GUI toggle and Tutorial05 to understand what they're doing. Then I'll try to replicate that with SlimDX.

In the meantime, if anyone has resizing code that behaves properly for them, I would appreciate it if you would share it with me. (wniehoff at stny dot rr dot com)

Walt

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!