3D Image Pair Display need example of page flipping
  1 / 3    
Hi All,

I'm trying to develop a simple app which takes a stereo pair of images (left and right) and flickers them so that the "composite" 3D image is viewable with the flicker glasses. Should I use DirectX or OpenGL? Does it matter? Are there any simple examples for a stereo pair viewer?

Thanks,

Rob
Hi All,



I'm trying to develop a simple app which takes a stereo pair of images (left and right) and flickers them so that the "composite" 3D image is viewable with the flicker glasses. Should I use DirectX or OpenGL? Does it matter? Are there any simple examples for a stereo pair viewer?



Thanks,



Rob

#1
Posted 08/12/2010 12:18 PM   
Hi All,

I'm trying to develop a simple app which takes a stereo pair of images (left and right) and flickers them so that the "composite" 3D image is viewable with the flicker glasses. Should I use DirectX or OpenGL? Does it matter? Are there any simple examples for a stereo pair viewer?

Thanks,

Rob
Hi All,



I'm trying to develop a simple app which takes a stereo pair of images (left and right) and flickers them so that the "composite" 3D image is viewable with the flicker glasses. Should I use DirectX or OpenGL? Does it matter? Are there any simple examples for a stereo pair viewer?



Thanks,



Rob

#2
Posted 08/12/2010 12:18 PM   
[quote name='rghoover' post='1103114' date='Aug 12 2010, 07:18 AM']Hi All,

I'm trying to develop a simple app which takes a stereo pair of images (left and right) and flickers them so that the "composite" 3D image is viewable with the flicker glasses. Should I use DirectX or OpenGL? Does it matter? Are there any simple examples for a stereo pair viewer?

Thanks,

Rob[/quote]

If you can display a single image in OpenGL, then adding the second image for stereo is easy. When creating your pixel format, include the PFD_STEREO flag - this will give you access to the left and right color buffers. You will need a Quadro card for this flag. When you render the left image, set the glDrawBuffer() to GL_LEFT, GL_FRONT_LEFT, or GL_BACK_LEFT depending on your implementation. Then when you render the right image, set the glDrawBuffer() to GL_RIGHT, GL_FRONT_RIGHT, or GL_BACK_RIGHT.
[quote name='rghoover' post='1103114' date='Aug 12 2010, 07:18 AM']Hi All,



I'm trying to develop a simple app which takes a stereo pair of images (left and right) and flickers them so that the "composite" 3D image is viewable with the flicker glasses. Should I use DirectX or OpenGL? Does it matter? Are there any simple examples for a stereo pair viewer?



Thanks,



Rob



If you can display a single image in OpenGL, then adding the second image for stereo is easy. When creating your pixel format, include the PFD_STEREO flag - this will give you access to the left and right color buffers. You will need a Quadro card for this flag. When you render the left image, set the glDrawBuffer() to GL_LEFT, GL_FRONT_LEFT, or GL_BACK_LEFT depending on your implementation. Then when you render the right image, set the glDrawBuffer() to GL_RIGHT, GL_FRONT_RIGHT, or GL_BACK_RIGHT.

#3
Posted 08/17/2010 03:16 PM   
[quote name='rghoover' post='1103114' date='Aug 12 2010, 07:18 AM']Hi All,

I'm trying to develop a simple app which takes a stereo pair of images (left and right) and flickers them so that the "composite" 3D image is viewable with the flicker glasses. Should I use DirectX or OpenGL? Does it matter? Are there any simple examples for a stereo pair viewer?

Thanks,

Rob[/quote]

If you can display a single image in OpenGL, then adding the second image for stereo is easy. When creating your pixel format, include the PFD_STEREO flag - this will give you access to the left and right color buffers. You will need a Quadro card for this flag. When you render the left image, set the glDrawBuffer() to GL_LEFT, GL_FRONT_LEFT, or GL_BACK_LEFT depending on your implementation. Then when you render the right image, set the glDrawBuffer() to GL_RIGHT, GL_FRONT_RIGHT, or GL_BACK_RIGHT.
[quote name='rghoover' post='1103114' date='Aug 12 2010, 07:18 AM']Hi All,



I'm trying to develop a simple app which takes a stereo pair of images (left and right) and flickers them so that the "composite" 3D image is viewable with the flicker glasses. Should I use DirectX or OpenGL? Does it matter? Are there any simple examples for a stereo pair viewer?



Thanks,



Rob



If you can display a single image in OpenGL, then adding the second image for stereo is easy. When creating your pixel format, include the PFD_STEREO flag - this will give you access to the left and right color buffers. You will need a Quadro card for this flag. When you render the left image, set the glDrawBuffer() to GL_LEFT, GL_FRONT_LEFT, or GL_BACK_LEFT depending on your implementation. Then when you render the right image, set the glDrawBuffer() to GL_RIGHT, GL_FRONT_RIGHT, or GL_BACK_RIGHT.

#4
Posted 08/17/2010 03:16 PM   
[quote name='SimWright' post='1105062' date='Aug 17 2010, 11:16 AM']If you can display a single image in OpenGL, then adding the second image for stereo is easy. When creating your pixel format, include the PFD_STEREO flag - this will give you access to the left and right color buffers. You will need a Quadro card for this flag. When you render the left image, set the glDrawBuffer() to GL_LEFT, GL_FRONT_LEFT, or GL_BACK_LEFT depending on your implementation. Then when you render the right image, set the glDrawBuffer() to GL_RIGHT, GL_FRONT_RIGHT, or GL_BACK_RIGHT.[/quote]


Thanks! :) Currently I'm fighting with DirectX, trying to compile my program in Embarcadero C++ Builder. It seems that DirectX is just too difficult to sync with a non-Micro$oft compiler. Your OpenGL advice looks good. Now I guess I need to find the OpenGL equivalent of DirectX SDK and install it... I'm running out of time... ;)
[quote name='SimWright' post='1105062' date='Aug 17 2010, 11:16 AM']If you can display a single image in OpenGL, then adding the second image for stereo is easy. When creating your pixel format, include the PFD_STEREO flag - this will give you access to the left and right color buffers. You will need a Quadro card for this flag. When you render the left image, set the glDrawBuffer() to GL_LEFT, GL_FRONT_LEFT, or GL_BACK_LEFT depending on your implementation. Then when you render the right image, set the glDrawBuffer() to GL_RIGHT, GL_FRONT_RIGHT, or GL_BACK_RIGHT.





Thanks! :) Currently I'm fighting with DirectX, trying to compile my program in Embarcadero C++ Builder. It seems that DirectX is just too difficult to sync with a non-Micro$oft compiler. Your OpenGL advice looks good. Now I guess I need to find the OpenGL equivalent of DirectX SDK and install it... I'm running out of time... ;)

#5
Posted 08/17/2010 04:00 PM   
[quote name='SimWright' post='1105062' date='Aug 17 2010, 11:16 AM']If you can display a single image in OpenGL, then adding the second image for stereo is easy. When creating your pixel format, include the PFD_STEREO flag - this will give you access to the left and right color buffers. You will need a Quadro card for this flag. When you render the left image, set the glDrawBuffer() to GL_LEFT, GL_FRONT_LEFT, or GL_BACK_LEFT depending on your implementation. Then when you render the right image, set the glDrawBuffer() to GL_RIGHT, GL_FRONT_RIGHT, or GL_BACK_RIGHT.[/quote]


Thanks! :) Currently I'm fighting with DirectX, trying to compile my program in Embarcadero C++ Builder. It seems that DirectX is just too difficult to sync with a non-Micro$oft compiler. Your OpenGL advice looks good. Now I guess I need to find the OpenGL equivalent of DirectX SDK and install it... I'm running out of time... ;)
[quote name='SimWright' post='1105062' date='Aug 17 2010, 11:16 AM']If you can display a single image in OpenGL, then adding the second image for stereo is easy. When creating your pixel format, include the PFD_STEREO flag - this will give you access to the left and right color buffers. You will need a Quadro card for this flag. When you render the left image, set the glDrawBuffer() to GL_LEFT, GL_FRONT_LEFT, or GL_BACK_LEFT depending on your implementation. Then when you render the right image, set the glDrawBuffer() to GL_RIGHT, GL_FRONT_RIGHT, or GL_BACK_RIGHT.





Thanks! :) Currently I'm fighting with DirectX, trying to compile my program in Embarcadero C++ Builder. It seems that DirectX is just too difficult to sync with a non-Micro$oft compiler. Your OpenGL advice looks good. Now I guess I need to find the OpenGL equivalent of DirectX SDK and install it... I'm running out of time... ;)

#6
Posted 08/17/2010 04:00 PM   
[quote name='rghoover' post='1105081' date='Aug 17 2010, 11:00 AM']Thanks! :) Currently I'm fighting with DirectX, trying to compile my program in Embarcadero C++ Builder. It seems that DirectX is just too difficult to sync with a non-Micro$oft compiler. Your OpenGL advice looks good. Now I guess I need to find the OpenGL equivalent of DirectX SDK and install it... I'm running out of time... ;)[/quote]

I use C++ Builder 6.0 and the OpenGL SDK is included. Do a search and see if you have the gl.h file.
[quote name='rghoover' post='1105081' date='Aug 17 2010, 11:00 AM']Thanks! :) Currently I'm fighting with DirectX, trying to compile my program in Embarcadero C++ Builder. It seems that DirectX is just too difficult to sync with a non-Micro$oft compiler. Your OpenGL advice looks good. Now I guess I need to find the OpenGL equivalent of DirectX SDK and install it... I'm running out of time... ;)



I use C++ Builder 6.0 and the OpenGL SDK is included. Do a search and see if you have the gl.h file.

#7
Posted 08/17/2010 04:40 PM   
[quote name='rghoover' post='1105081' date='Aug 17 2010, 11:00 AM']Thanks! :) Currently I'm fighting with DirectX, trying to compile my program in Embarcadero C++ Builder. It seems that DirectX is just too difficult to sync with a non-Micro$oft compiler. Your OpenGL advice looks good. Now I guess I need to find the OpenGL equivalent of DirectX SDK and install it... I'm running out of time... ;)[/quote]

I use C++ Builder 6.0 and the OpenGL SDK is included. Do a search and see if you have the gl.h file.
[quote name='rghoover' post='1105081' date='Aug 17 2010, 11:00 AM']Thanks! :) Currently I'm fighting with DirectX, trying to compile my program in Embarcadero C++ Builder. It seems that DirectX is just too difficult to sync with a non-Micro$oft compiler. Your OpenGL advice looks good. Now I guess I need to find the OpenGL equivalent of DirectX SDK and install it... I'm running out of time... ;)



I use C++ Builder 6.0 and the OpenGL SDK is included. Do a search and see if you have the gl.h file.

#8
Posted 08/17/2010 04:40 PM   
[quote name='SimWright' post='1105098' date='Aug 17 2010, 12:40 PM']I use C++ Builder 6.0 and the OpenGL SDK is included. Do a search and see if you have the gl.h file.[/quote]

I have found the file and used it. :) Currently I have an app which draws a red field and then a blue field, back and forth with the goal being shutter glasses hiding one field from one eye and the other field from the other eye.

I see in the OpenGL documentation that "PFD_STEREO - The buffer is stereoscopic. This flag is not supported in the current generic implementation." What does this mean?

I believe my app currently draws the fields with no regard for the monitor sync. Should I be using NVAPI to sync with the monitor as it's their gizmo on the USB port talking to the glasses?
[quote name='SimWright' post='1105098' date='Aug 17 2010, 12:40 PM']I use C++ Builder 6.0 and the OpenGL SDK is included. Do a search and see if you have the gl.h file.



I have found the file and used it. :) Currently I have an app which draws a red field and then a blue field, back and forth with the goal being shutter glasses hiding one field from one eye and the other field from the other eye.



I see in the OpenGL documentation that "PFD_STEREO - The buffer is stereoscopic. This flag is not supported in the current generic implementation." What does this mean?



I believe my app currently draws the fields with no regard for the monitor sync. Should I be using NVAPI to sync with the monitor as it's their gizmo on the USB port talking to the glasses?

#9
Posted 08/17/2010 08:41 PM   
[quote name='SimWright' post='1105098' date='Aug 17 2010, 12:40 PM']I use C++ Builder 6.0 and the OpenGL SDK is included. Do a search and see if you have the gl.h file.[/quote]

I have found the file and used it. :) Currently I have an app which draws a red field and then a blue field, back and forth with the goal being shutter glasses hiding one field from one eye and the other field from the other eye.

I see in the OpenGL documentation that "PFD_STEREO - The buffer is stereoscopic. This flag is not supported in the current generic implementation." What does this mean?

I believe my app currently draws the fields with no regard for the monitor sync. Should I be using NVAPI to sync with the monitor as it's their gizmo on the USB port talking to the glasses?
[quote name='SimWright' post='1105098' date='Aug 17 2010, 12:40 PM']I use C++ Builder 6.0 and the OpenGL SDK is included. Do a search and see if you have the gl.h file.



I have found the file and used it. :) Currently I have an app which draws a red field and then a blue field, back and forth with the goal being shutter glasses hiding one field from one eye and the other field from the other eye.



I see in the OpenGL documentation that "PFD_STEREO - The buffer is stereoscopic. This flag is not supported in the current generic implementation." What does this mean?



I believe my app currently draws the fields with no regard for the monitor sync. Should I be using NVAPI to sync with the monitor as it's their gizmo on the USB port talking to the glasses?

#10
Posted 08/17/2010 08:41 PM   
[quote name='rghoover' post='1105222' date='Aug 17 2010, 03:41 PM']I have found the file and used it. :) Currently I have an app which draws a red field and then a blue field, back and forth with the goal being shutter glasses hiding one field from one eye and the other field from the other eye.

I see in the OpenGL documentation that "PFD_STEREO - The buffer is stereoscopic. This flag is not supported in the current generic implementation." What does this mean?

I believe my app currently draws the fields with no regard for the monitor sync. Should I be using NVAPI to sync with the monitor as it's their gizmo on the USB port talking to the glasses?[/quote]

"This flag is not supported in the current generic implementation" means that the generic software driver from Microsoft doesn't support the flag. It has to be supported by the graphics card driver and it is for the Quadro cards. As long as you have the NIVDIA Control Panel setting for Stereo-Enable set to On and Stereo-Display mode set to either On-board DIN connector (with NVIDIA IR Emitter) or Generic active stereo (with NVIDIA IR Emitter), depending on your setup, then the PFD_STEREO flag should be supported.

The driver handles the monitor sync - you don't have to do anything else.
[quote name='rghoover' post='1105222' date='Aug 17 2010, 03:41 PM']I have found the file and used it. :) Currently I have an app which draws a red field and then a blue field, back and forth with the goal being shutter glasses hiding one field from one eye and the other field from the other eye.



I see in the OpenGL documentation that "PFD_STEREO - The buffer is stereoscopic. This flag is not supported in the current generic implementation." What does this mean?



I believe my app currently draws the fields with no regard for the monitor sync. Should I be using NVAPI to sync with the monitor as it's their gizmo on the USB port talking to the glasses?



"This flag is not supported in the current generic implementation" means that the generic software driver from Microsoft doesn't support the flag. It has to be supported by the graphics card driver and it is for the Quadro cards. As long as you have the NIVDIA Control Panel setting for Stereo-Enable set to On and Stereo-Display mode set to either On-board DIN connector (with NVIDIA IR Emitter) or Generic active stereo (with NVIDIA IR Emitter), depending on your setup, then the PFD_STEREO flag should be supported.



The driver handles the monitor sync - you don't have to do anything else.

#11
Posted 08/17/2010 08:54 PM   
[quote name='rghoover' post='1105222' date='Aug 17 2010, 03:41 PM']I have found the file and used it. :) Currently I have an app which draws a red field and then a blue field, back and forth with the goal being shutter glasses hiding one field from one eye and the other field from the other eye.

I see in the OpenGL documentation that "PFD_STEREO - The buffer is stereoscopic. This flag is not supported in the current generic implementation." What does this mean?

I believe my app currently draws the fields with no regard for the monitor sync. Should I be using NVAPI to sync with the monitor as it's their gizmo on the USB port talking to the glasses?[/quote]

"This flag is not supported in the current generic implementation" means that the generic software driver from Microsoft doesn't support the flag. It has to be supported by the graphics card driver and it is for the Quadro cards. As long as you have the NIVDIA Control Panel setting for Stereo-Enable set to On and Stereo-Display mode set to either On-board DIN connector (with NVIDIA IR Emitter) or Generic active stereo (with NVIDIA IR Emitter), depending on your setup, then the PFD_STEREO flag should be supported.

The driver handles the monitor sync - you don't have to do anything else.
[quote name='rghoover' post='1105222' date='Aug 17 2010, 03:41 PM']I have found the file and used it. :) Currently I have an app which draws a red field and then a blue field, back and forth with the goal being shutter glasses hiding one field from one eye and the other field from the other eye.



I see in the OpenGL documentation that "PFD_STEREO - The buffer is stereoscopic. This flag is not supported in the current generic implementation." What does this mean?



I believe my app currently draws the fields with no regard for the monitor sync. Should I be using NVAPI to sync with the monitor as it's their gizmo on the USB port talking to the glasses?



"This flag is not supported in the current generic implementation" means that the generic software driver from Microsoft doesn't support the flag. It has to be supported by the graphics card driver and it is for the Quadro cards. As long as you have the NIVDIA Control Panel setting for Stereo-Enable set to On and Stereo-Display mode set to either On-board DIN connector (with NVIDIA IR Emitter) or Generic active stereo (with NVIDIA IR Emitter), depending on your setup, then the PFD_STEREO flag should be supported.



The driver handles the monitor sync - you don't have to do anything else.

#12
Posted 08/17/2010 08:54 PM   
[quote name='SimWright' post='1105229' date='Aug 17 2010, 04:54 PM']"This flag is not supported in the current generic implementation" means that the generic software driver from Microsoft doesn't support the flag. It has to be supported by the graphics card driver and it is for the Quadro cards. As long as you have the NIVDIA Control Panel setting for Stereo-Enable set to On and Stereo-Display mode set to either On-board DIN connector (with NVIDIA IR Emitter) or Generic active stereo (with NVIDIA IR Emitter), depending on your setup, then the PFD_STEREO flag should be supported.

The driver handles the monitor sync - you don't have to do anything else.[/quote]


Sounds great! The problem I had with DirectX back in the day was that I had no control over which image was displayed first in terms of the sync. So, sometimes the eyes were correct, and sometimes they were reversed. Does NVIDIA take care of that too? :)
[quote name='SimWright' post='1105229' date='Aug 17 2010, 04:54 PM']"This flag is not supported in the current generic implementation" means that the generic software driver from Microsoft doesn't support the flag. It has to be supported by the graphics card driver and it is for the Quadro cards. As long as you have the NIVDIA Control Panel setting for Stereo-Enable set to On and Stereo-Display mode set to either On-board DIN connector (with NVIDIA IR Emitter) or Generic active stereo (with NVIDIA IR Emitter), depending on your setup, then the PFD_STEREO flag should be supported.



The driver handles the monitor sync - you don't have to do anything else.





Sounds great! The problem I had with DirectX back in the day was that I had no control over which image was displayed first in terms of the sync. So, sometimes the eyes were correct, and sometimes they were reversed. Does NVIDIA take care of that too? :)

#13
Posted 08/17/2010 10:48 PM   
[quote name='SimWright' post='1105229' date='Aug 17 2010, 04:54 PM']"This flag is not supported in the current generic implementation" means that the generic software driver from Microsoft doesn't support the flag. It has to be supported by the graphics card driver and it is for the Quadro cards. As long as you have the NIVDIA Control Panel setting for Stereo-Enable set to On and Stereo-Display mode set to either On-board DIN connector (with NVIDIA IR Emitter) or Generic active stereo (with NVIDIA IR Emitter), depending on your setup, then the PFD_STEREO flag should be supported.

The driver handles the monitor sync - you don't have to do anything else.[/quote]


Sounds great! The problem I had with DirectX back in the day was that I had no control over which image was displayed first in terms of the sync. So, sometimes the eyes were correct, and sometimes they were reversed. Does NVIDIA take care of that too? :)
[quote name='SimWright' post='1105229' date='Aug 17 2010, 04:54 PM']"This flag is not supported in the current generic implementation" means that the generic software driver from Microsoft doesn't support the flag. It has to be supported by the graphics card driver and it is for the Quadro cards. As long as you have the NIVDIA Control Panel setting for Stereo-Enable set to On and Stereo-Display mode set to either On-board DIN connector (with NVIDIA IR Emitter) or Generic active stereo (with NVIDIA IR Emitter), depending on your setup, then the PFD_STEREO flag should be supported.



The driver handles the monitor sync - you don't have to do anything else.





Sounds great! The problem I had with DirectX back in the day was that I had no control over which image was displayed first in terms of the sync. So, sometimes the eyes were correct, and sometimes they were reversed. Does NVIDIA take care of that too? :)

#14
Posted 08/17/2010 10:48 PM   
[quote name='rghoover' post='1105275' date='Aug 17 2010, 03:48 PM']Sounds great! The problem I had with DirectX back in the day was that I had no control over which image was displayed first in terms of the sync. So, sometimes the eyes were correct, and sometimes they were reversed. Does NVIDIA take care of that too? :)[/quote]

You can write apps where they do take care of that, but it's not well documented, you end up creating a wide (or possibly tall I can't remember) frame buffer with both image in it and write some magic ID at the start of the Frame buffer.
When the driver sees it, it just does the right thing. This is how the video and picture viewers NVidia provides work.
[quote name='rghoover' post='1105275' date='Aug 17 2010, 03:48 PM']Sounds great! The problem I had with DirectX back in the day was that I had no control over which image was displayed first in terms of the sync. So, sometimes the eyes were correct, and sometimes they were reversed. Does NVIDIA take care of that too? :)



You can write apps where they do take care of that, but it's not well documented, you end up creating a wide (or possibly tall I can't remember) frame buffer with both image in it and write some magic ID at the start of the Frame buffer.

When the driver sees it, it just does the right thing. This is how the video and picture viewers NVidia provides work.
#15
Posted 08/17/2010 10:57 PM   
  1 / 3    
Scroll To Top