OpenGL and Shutter Glasses
  1 / 2    
Hello -- I'm new to stereo 3D development ... and can use some advise ... My environment: Windows 7, 64-bit; Quadro 6000 gpu; MS Visual Studio 2010 Professional, C++; ViewSonic V3D245 3D-ready monitor; NVIDIA 3D Vision shutter glasses; Global Presets set to OpenGL 3D Stereo, Stereo Display Mode set to Generic Active Stereo (with NVIDIA 3D Vision, Stereo-Enable set to ON; Refresh rate set to 120 Hz, Resolution set to 1920 x 1080 pixels. The 3D test works fine so it appears the system is configured properly. I was able to compile the simple stereo program listed below with the Visual Studio cl compiler and with the NVIDIA nvcc compiler. This simple program merely creates two squares; one red for left eye and one blue for right eye. I got the program from http://www.gali-3d.com/archive/articles/StereoOpenGL/StereoscopicOpenGLTutorial.php When I run it I can see the flickering ... with both eyes ... that is, I am not getting red only on the left eye nor blue only on the right eye. Any suggestions/guidance would be reatly appreciated. Regards, Ric #include <stdlib.h> #include <stdio.h> #include <GL/glut.h> void display(void) { glDrawBuffer(GL_BACK_LEFT); glClearColor(1.0, 0.0, 0.0, 1.0); /* red */ glClear(GL_COLOR_BUFFER_BIT); glDrawBuffer(GL_BACK_RIGHT); glClearColor(0.0, 0.0, 1.0, 1.0); /* blue */ glClear(GL_COLOR_BUFFER_BIT); glutSwapBuffers(); } int main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STEREO); glutCreateWindow("stereo example"); glutDisplayFunc(display); glutMainLoop(); return 0; /* ANSI C requires main to return int. */ }
Hello --

I'm new to stereo 3D development ... and can use some advise ...

My environment: Windows 7, 64-bit; Quadro 6000 gpu; MS Visual Studio 2010 Professional, C++; ViewSonic V3D245 3D-ready monitor; NVIDIA 3D Vision shutter glasses; Global Presets set to OpenGL 3D Stereo, Stereo Display Mode set to Generic Active Stereo (with NVIDIA 3D Vision, Stereo-Enable set to ON; Refresh rate set to 120 Hz, Resolution set to 1920 x 1080 pixels.

The 3D test works fine so it appears the system is configured properly.

I was able to compile the simple stereo program listed below with the Visual Studio cl compiler and with the NVIDIA nvcc compiler. This simple program merely creates two squares; one red for left eye and one blue for right eye. I got the program from http://www.gali-3d.com/archive/articles/StereoOpenGL/StereoscopicOpenGLTutorial.php


When I run it I can see the flickering ... with both eyes ... that is, I am not getting red only on the left eye nor blue only on the right eye.

Any suggestions/guidance would be reatly appreciated.

Regards,

Ric

#include <stdlib.h>

#include <stdio.h>

#include <GL/glut.h>



void
display(void)

{


glDrawBuffer(GL_BACK_LEFT);

glClearColor(1.0, 0.0, 0.0, 1.0); /* red */

glClear(GL_COLOR_BUFFER_BIT);

glDrawBuffer(GL_BACK_RIGHT);

glClearColor(0.0, 0.0, 1.0, 1.0); /* blue */

glClear(GL_COLOR_BUFFER_BIT);

glutSwapBuffers();

}



int

main(int argc, char **argv)

{


glutInit(&argc, argv);

glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STEREO);

glutCreateWindow("stereo example");

glutDisplayFunc(display);

glutMainLoop();


return 0; /* ANSI C requires main to return int. */


}

#1
Posted 03/20/2013 08:51 PM   
If they are two separate images your brain wont be fooled and will be able too see them both, also a little flickering might be noticable in your peripheral vision but not on the monitor, you might just have eyes that are able to pick it up where others are not. Look at it with one eye open?
If they are two separate images your brain wont be fooled and will be able too see them both, also a little flickering might be noticable in your peripheral vision but not on the monitor, you might just have eyes that are able to pick it up where others are not. Look at it with one eye open?

#2
Posted 03/20/2013 09:54 PM   
Try making your window full screen. My reading of regular windows suggests that there are extra calls necessary to make it work when not in full screen. If it's flickering, that suggests that the timing is off. Are there any synchronization calls that would make sense? Maybe try it in the red/blue Discover mode as an experiment to remove timing constraints. (probably change your rectangle colors to make them more visible.)
Try making your window full screen. My reading of regular windows suggests that there are extra calls necessary to make it work when not in full screen.

If it's flickering, that suggests that the timing is off. Are there any synchronization calls that would make sense?

Maybe try it in the red/blue Discover mode as an experiment to remove timing constraints. (probably change your rectangle colors to make them more visible.)

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

#3
Posted 03/21/2013 09:19 AM   
Don't know about the code - but - the S3D Test in the CPL (spinning logo in arched hallway) doesn't use OGL calls but directX IIRC the OGL test is a helicopter... Youc an check OGL using a quadbuffered application such as the marvelous and FREE [url=http://www.descent2.de/]D2X-XL[/url], enabling the switch '-quad_buffering' in the d2x.ini and set stereoscopic rendering to shutter from the in game menu.. Oh, on my first attempt I had to disable streoscopivc rendering in the corresponding section of the cpl (leaving OGL Stereo enbled of course to get OGL S3D rendering but somehow no longer....
Don't know about the code - but - the S3D Test in the CPL (spinning logo in arched hallway) doesn't use OGL calls but directX IIRC the OGL test is a helicopter... Youc an check OGL using a quadbuffered application such as the marvelous and FREE D2X-XL, enabling the switch '-quad_buffering' in the d2x.ini and set stereoscopic rendering to shutter from the in game menu..


Oh, on my first attempt I had to disable streoscopivc rendering in the corresponding section of the cpl (leaving OGL Stereo enbled of course to get OGL S3D rendering but somehow no longer....

#4
Posted 03/21/2013 02:59 PM   
Hah, now I know what the deal is with that helicopter. I always wondered....
Hah, now I know what the deal is with that helicopter. I always wondered....

#5
Posted 03/21/2013 03:55 PM   
Cookybiscuit, bo3b, quadrophoeniX, D-Man11 -- Thank you for your responses ... I tried using a full scree and that didn't help ... I contacted the author of the sample program that I included in my initial post ... he indicates that the 3D test (spinning logo) is for DirectX not for OpenGL ... and that I will need to disable DirectX primary to have stable OpenGL 3D ... but I don't know how to do this ... no options in the NVIDIA Control Panel for this ... nor are there any DirectX items in the Control Panel->Uninstall Programs list to uninstall ... I'm also having trouble downloading D2X-XL ... Does anyone have a snipet of code? ... something along the lines of a HelloWorld.c ... that takes care of all the plumbing for OpenGL with Quadro 6000, Windows 7 64-bit ... what would I need to add to the program I'm using to disable DirectX ... or enable OpenGL S3D ... or how to configure my system for that purpose ... Thanks.
Cookybiscuit, bo3b, quadrophoeniX, D-Man11 --

Thank you for your responses ...

I tried using a full scree and that didn't help ...

I contacted the author of the sample program that I included in my initial post ... he indicates that the 3D test (spinning logo) is for DirectX not for OpenGL ... and that I will need to disable DirectX primary to have stable OpenGL 3D ... but I don't know how to do this ... no options in the NVIDIA Control Panel for this ... nor are there any DirectX items in the Control Panel->Uninstall Programs list to uninstall ...

I'm also having trouble downloading D2X-XL ...

Does anyone have a snipet of code? ... something along the lines of a HelloWorld.c ... that takes care of all the plumbing for OpenGL with Quadro 6000, Windows 7 64-bit ... what would I need to add to the program I'm using to disable DirectX ... or enable OpenGL S3D ... or how to configure my system for that purpose ...

Thanks.

#6
Posted 03/22/2013 02:45 PM   
Have you looked at Nvidia's OpenGL page? https://developer.nvidia.com/opengl and you might try posting in the developer forum, where you'll probably be more likely to find answers. https://devtalk.nvidia.com/
Have you looked at Nvidia's OpenGL page?
https://developer.nvidia.com/opengl

and you might try posting in the developer forum, where you'll probably be more likely to find answers.
https://devtalk.nvidia.com/

#7
Posted 03/22/2013 03:16 PM   
[quote="Game6"] ... he indicates that the 3D test (spinning logo) is for DirectX not for OpenGL ... and that I will need to disable DirectX primary to have stable OpenGL 3D ... but I don't know how to do this ... [/quote] As I said - this is to 100% consistent with my findings. Sounds unlogical, but go to the stereoscopic settings pane of the control panel and untick "activate stereoscopic function" - this will disable [i]DX[/i] S3D. The S3D settings for OGL are dealt with only and exclusively in the OGL setting right on the top of the navigation list(where you also set the S3D mode). The helicopter tst should be the "Hello World" test you're looking for. Also the Quadro 3D file player can be set to use OGL. Oh yeah: and make sure your global desktop refresh rate is also set to 120Hz! Hope that helps.... btw: what I forgot about D2X-XL is that you would need the original install files, sorry 'bout that....
Game6 said: ... he indicates that the 3D test (spinning logo) is for DirectX not for OpenGL ... and that I will need to disable DirectX primary to have stable OpenGL 3D ... but I don't know how to do this ...

As I said - this is to 100% consistent with my findings. Sounds unlogical, but go to the stereoscopic settings pane of the control panel and untick "activate stereoscopic function" - this will disable DX S3D. The S3D settings for OGL are dealt with only and exclusively in the OGL setting right on the top of the navigation list(where you also set the S3D mode). The helicopter tst should be the "Hello World" test you're looking for. Also the Quadro 3D file player can be set to use OGL.

Oh yeah: and make sure your global desktop refresh rate is also set to 120Hz!

Hope that helps....

btw: what I forgot about D2X-XL is that you would need the original install files, sorry 'bout that....

#8
Posted 03/22/2013 03:32 PM   
Folks -- Thanks again for your help ... I got the thing to work ... FYI ... there was a configuration option in the NVIDIA Control Panel after all ... I set both the Global Settings and Program Settings to Generic Active Stereo (with NVIDIA 3D Vision) ... and the OpenGL Rendering GPU to Quadro 6000 ... and voila ... I didn't have to do any DirectX disabling or anything else ... for now at least ... we'll see if this works for more involved graphics ... see http://www.nvidia.com/object/quadro_pro_graphics_boards.html Hope this helps others. Cheers!
Folks --

Thanks again for your help ... I got the thing to work ...

FYI ... there was a configuration option in the NVIDIA Control Panel after all ... I set both the Global Settings and Program Settings to Generic Active Stereo (with NVIDIA 3D Vision) ... and the OpenGL Rendering GPU to Quadro 6000 ... and voila ...

I didn't have to do any DirectX disabling or anything else ... for now at least ... we'll see if this works for more involved graphics ...

see http://www.nvidia.com/object/quadro_pro_graphics_boards.html


Hope this helps others.

Cheers!

#9
Posted 03/22/2013 03:52 PM   
Hello I've could run some 3D vision samples in Visual Studio 2010,using Direct3D and openGL succesfully. but actually I'm trying to be able to control each frame of the glasses ,like turning them on and off as I want ,or choosing what each of them would show. but I don't know how! The 3Dvision manuals didn't help me so much. could you please help me figure it out ?! Sorry I am noob in this field :)
Hello
I've could run some 3D vision samples in Visual Studio 2010,using Direct3D and openGL succesfully. but actually I'm trying to be able to control each frame of the glasses ,like turning them on and off as I want ,or choosing what each of them would show. but I don't know how! The 3Dvision manuals didn't help me so much.
could you please help me figure it out ?!
Sorry I am noob in this field :)

#10
Posted 08/10/2014 05:28 PM   
Nvidia has hotkeys. Control+T will turn 3D Vision on and off. http://3dvision-blog.com/111-changing-the-convergence-level-in-3d-vision/ It's possible that Visual Studio may have its own hotkeys. No idea really, I just use it for gaming.
Nvidia has hotkeys. Control+T will turn 3D Vision on and off.


http://3dvision-blog.com/111-changing-the-convergence-level-in-3d-vision/


It's possible that Visual Studio may have its own hotkeys.

No idea really, I just use it for gaming.

#11
Posted 08/11/2014 12:08 AM   
Thanks for your response. sorry I didn't explain clearly. I want to implement Hess screen test for strabismus diagnosis by these glasses. So I have to show completely different images in each of the frames.(I don't need 3D) But as first step I am trying to turn off one of the frames. I know I need to work with SDK s but don't know how.
Thanks for your response.
sorry I didn't explain clearly. I want to implement Hess screen test for strabismus diagnosis by these glasses. So I have to show completely different images in each of the frames.(I don't need 3D)
But as first step I am trying to turn off one of the frames.
I know I need to work with SDK s but don't know how.

#12
Posted 08/11/2014 06:17 AM   
I don't believe anyone here knows how to control the glasses in that way, sorry.
I don't believe anyone here knows how to control the glasses in that way, sorry.

#13
Posted 08/11/2014 06:38 AM   
Do you need to have the images change based on the user input? If not, then it seems like you'd be better suited to use a custom-built 3D movie, with each eye seeing the specific image that you want. Then you could use normal movie playback software and hardware. Building a 3D movie with a side-by-side image would be dramatically easier than writing code to do this.
Do you need to have the images change based on the user input? If not, then it seems like you'd be better suited to use a custom-built 3D movie, with each eye seeing the specific image that you want. Then you could use normal movie playback software and hardware.

Building a 3D movie with a side-by-side image would be dramatically easier than writing code to do this.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

#14
Posted 08/11/2014 09:13 AM   
It seems to me that using a stereoscopic image during such a test would skew the results. But you might try using Nvidia's 3D Vision Viewer or sView. When Stereo photos are loaded, they'd be 3D. Load a 2D photo for non stereo. http://www.sview.ru/en http://www.nvidia.com/object/3d-vision-photo-viewer.html It's a little confusing that on one hand you say you do not need 3D, but on the other you say you need the glasses for diagnosis.
It seems to me that using a stereoscopic image during such a test would skew the results.

But you might try using Nvidia's 3D Vision Viewer or sView. When Stereo photos are loaded, they'd be 3D. Load a 2D photo for non stereo.


http://www.sview.ru/en



http://www.nvidia.com/object/3d-vision-photo-viewer.html


It's a little confusing that on one hand you say you do not need 3D, but on the other you say you need the glasses for diagnosis.

#15
Posted 08/11/2014 09:37 AM   
  1 / 2    
Scroll To Top