3D Image Pair Display need example of page flipping
2 / 3
[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.
[quote name='rghoover' post='1105275' date='Aug 17 2010, 05: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]
[quote name='rghoover' post='1105275' date='Aug 17 2010, 05: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 name='rghoover' post='1105275' date='Aug 17 2010, 05: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]
[quote name='rghoover' post='1105275' date='Aug 17 2010, 05: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 name='ERP' post='1105280' date='Aug 17 2010, 05:57 PM']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]
Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.
[quote name='ERP' post='1105280' date='Aug 17 2010, 05:57 PM']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.
Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.
[quote name='ERP' post='1105280' date='Aug 17 2010, 05:57 PM']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]
Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.
[quote name='ERP' post='1105280' date='Aug 17 2010, 05:57 PM']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.
Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.
[quote name='SimWright' post='1105287' date='Aug 17 2010, 04:12 PM']Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.[/quote]
[quote name='SimWright' post='1105287' date='Aug 17 2010, 04:12 PM']Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.
[quote name='SimWright' post='1105287' date='Aug 17 2010, 04:12 PM']Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.[/quote]
[quote name='SimWright' post='1105287' date='Aug 17 2010, 04:12 PM']Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.
[quote name='SimWright' post='1105287' date='Aug 17 2010, 07:12 PM']Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.[/quote]
That sounds ideal! :) I'm trying to write a red field on one eye and blue on the other for flip testing. But I can't seem to get Stereo mode enabled. :( According to NVIDIA Control Panel, stereoscopic 3D is enabled. And I can visualize 3D using their views. So, I believe my hardware is set up properly. My program fails to configure the driver for stereo I think...
// test stereo mode acceptance by Windows
if ((pfd.dwFlags & PFD_STEREO) == 0)
MessageBoxError("Stereo mode not available!!!", "OpenGL");
else
MessageBoxInfo("Stereo mode available!!!", "OpenGL");
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?
[quote name='SimWright' post='1105287' date='Aug 17 2010, 07:12 PM']Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.
That sounds ideal! :) I'm trying to write a red field on one eye and blue on the other for flip testing. But I can't seem to get Stereo mode enabled. :( According to NVIDIA Control Panel, stereoscopic 3D is enabled. And I can visualize 3D using their views. So, I believe my hardware is set up properly. My program fails to configure the driver for stereo I think...
[quote name='SimWright' post='1105287' date='Aug 17 2010, 07:12 PM']Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.[/quote]
That sounds ideal! :) I'm trying to write a red field on one eye and blue on the other for flip testing. But I can't seem to get Stereo mode enabled. :( According to NVIDIA Control Panel, stereoscopic 3D is enabled. And I can visualize 3D using their views. So, I believe my hardware is set up properly. My program fails to configure the driver for stereo I think...
// test stereo mode acceptance by Windows
if ((pfd.dwFlags & PFD_STEREO) == 0)
MessageBoxError("Stereo mode not available!!!", "OpenGL");
else
MessageBoxInfo("Stereo mode available!!!", "OpenGL");
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?
[quote name='SimWright' post='1105287' date='Aug 17 2010, 07:12 PM']Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.
That sounds ideal! :) I'm trying to write a red field on one eye and blue on the other for flip testing. But I can't seem to get Stereo mode enabled. :( According to NVIDIA Control Panel, stereoscopic 3D is enabled. And I can visualize 3D using their views. So, I believe my hardware is set up properly. My program fails to configure the driver for stereo I think...
[quote name='rghoover' post='1105578' date='Aug 18 2010, 08:29 AM']That sounds ideal! :) I'm trying to write a red field on one eye and blue on the other for flip testing. But I can't seem to get Stereo mode enabled. :( According to NVIDIA Control Panel, stereoscopic 3D is enabled. And I can visualize 3D using their views. So, I believe my hardware is set up properly. My program fails to configure the driver for stereo I think...
// test stereo mode acceptance by Windows
if ((pfd.dwFlags & PFD_STEREO) == 0)
MessageBoxError("Stereo mode not available!!!", "OpenGL");
else
MessageBoxInfo("Stereo mode available!!!", "OpenGL");
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?[/quote]
The code looks ok.
What graphics card are you using? It needs to be a Quadro version that uses a G80 GPU or later.
Do you have the NVIDIA stereo driver enabled? I might not be using the correct name because we don't install it - the part of the 3D Vision software that is used to display DirectX games in stereo. I think this has to be disabled for the OpenGL quad-buffered stereo to work.
I'm not up to date on the version of C++ Builder that you are using but I did run into a problem when I first started developing stereo apps with C++ Builder version 1.0. An application may only set the pixel format of a window one time. Once a window's pixel format is set, it cannot be changed. I was using the Builder VCL panel component for my window and the pixel format was being set before I had control. I had to write my own custom panel component so that I could be the one to set the pixel format.
[quote name='rghoover' post='1105578' date='Aug 18 2010, 08:29 AM']That sounds ideal! :) I'm trying to write a red field on one eye and blue on the other for flip testing. But I can't seem to get Stereo mode enabled. :( According to NVIDIA Control Panel, stereoscopic 3D is enabled. And I can visualize 3D using their views. So, I believe my hardware is set up properly. My program fails to configure the driver for stereo I think...
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?
The code looks ok.
What graphics card are you using? It needs to be a Quadro version that uses a G80 GPU or later.
Do you have the NVIDIA stereo driver enabled? I might not be using the correct name because we don't install it - the part of the 3D Vision software that is used to display DirectX games in stereo. I think this has to be disabled for the OpenGL quad-buffered stereo to work.
I'm not up to date on the version of C++ Builder that you are using but I did run into a problem when I first started developing stereo apps with C++ Builder version 1.0. An application may only set the pixel format of a window one time. Once a window's pixel format is set, it cannot be changed. I was using the Builder VCL panel component for my window and the pixel format was being set before I had control. I had to write my own custom panel component so that I could be the one to set the pixel format.
[quote name='rghoover' post='1105578' date='Aug 18 2010, 08:29 AM']That sounds ideal! :) I'm trying to write a red field on one eye and blue on the other for flip testing. But I can't seem to get Stereo mode enabled. :( According to NVIDIA Control Panel, stereoscopic 3D is enabled. And I can visualize 3D using their views. So, I believe my hardware is set up properly. My program fails to configure the driver for stereo I think...
// test stereo mode acceptance by Windows
if ((pfd.dwFlags & PFD_STEREO) == 0)
MessageBoxError("Stereo mode not available!!!", "OpenGL");
else
MessageBoxInfo("Stereo mode available!!!", "OpenGL");
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?[/quote]
The code looks ok.
What graphics card are you using? It needs to be a Quadro version that uses a G80 GPU or later.
Do you have the NVIDIA stereo driver enabled? I might not be using the correct name because we don't install it - the part of the 3D Vision software that is used to display DirectX games in stereo. I think this has to be disabled for the OpenGL quad-buffered stereo to work.
I'm not up to date on the version of C++ Builder that you are using but I did run into a problem when I first started developing stereo apps with C++ Builder version 1.0. An application may only set the pixel format of a window one time. Once a window's pixel format is set, it cannot be changed. I was using the Builder VCL panel component for my window and the pixel format was being set before I had control. I had to write my own custom panel component so that I could be the one to set the pixel format.
[quote name='rghoover' post='1105578' date='Aug 18 2010, 08:29 AM']That sounds ideal! :) I'm trying to write a red field on one eye and blue on the other for flip testing. But I can't seem to get Stereo mode enabled. :( According to NVIDIA Control Panel, stereoscopic 3D is enabled. And I can visualize 3D using their views. So, I believe my hardware is set up properly. My program fails to configure the driver for stereo I think...
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?
The code looks ok.
What graphics card are you using? It needs to be a Quadro version that uses a G80 GPU or later.
Do you have the NVIDIA stereo driver enabled? I might not be using the correct name because we don't install it - the part of the 3D Vision software that is used to display DirectX games in stereo. I think this has to be disabled for the OpenGL quad-buffered stereo to work.
I'm not up to date on the version of C++ Builder that you are using but I did run into a problem when I first started developing stereo apps with C++ Builder version 1.0. An application may only set the pixel format of a window one time. Once a window's pixel format is set, it cannot be changed. I was using the Builder VCL panel component for my window and the pixel format was being set before I had control. I had to write my own custom panel component so that I could be the one to set the pixel format.
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.
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.
My Blog
Yes, with OpenGL that is taken care of too.
Yes, with OpenGL that is taken care of too.
Yes, with OpenGL that is taken care of too.
Yes, with OpenGL that is taken care of too.
When the driver sees it, it just does the right thing. This is how the video and picture viewers NVidia provides work.[/quote]
Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.
When the driver sees it, it just does the right thing. This is how the video and picture viewers NVidia provides work.
Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.
When the driver sees it, it just does the right thing. This is how the video and picture viewers NVidia provides work.[/quote]
Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.
When the driver sees it, it just does the right thing. This is how the video and picture viewers NVidia provides work.
Not with quad-buffered OpenGL stereo. Whatever is rendered in the left frame buffer will display in the left eye and whatever is rendered in the right frame buffer will display in the right eye.
Doesn't that only work on Quadro cards?
Doesn't that only work on Quadro cards?
My Blog
Doesn't that only work on Quadro cards?
Doesn't that only work on Quadro cards?
My Blog
Yes, and I mentioned that requirement in my first reply.
Yes, and I mentioned that requirement in my first reply.
Yes, and I mentioned that requirement in my first reply.
Yes, and I mentioned that requirement in my first reply.
[url="http://www.mtbs3d.com/phpBB/viewtopic.php?f=7&t=5072"]http://www.mtbs3d.com/phpBB/viewtopic.php?f=7&t=5072[/url]
Hope this help you.
Regards,
Olivier.
http://www.mtbs3d.com/phpBB/viewtopic.php?f=7&t=5072
Hope this help you.
Regards,
Olivier.
[url="http://www.mtbs3d.com/phpBB/viewtopic.php?f=7&t=5072"]http://www.mtbs3d.com/phpBB/viewtopic.php?f=7&t=5072[/url]
Hope this help you.
Regards,
Olivier.
http://www.mtbs3d.com/phpBB/viewtopic.php?f=7&t=5072
Hope this help you.
Regards,
Olivier.
That sounds ideal! :) I'm trying to write a red field on one eye and blue on the other for flip testing. But I can't seem to get Stereo mode enabled. :( According to NVIDIA Control Panel, stereoscopic 3D is enabled. And I can visualize 3D using their views. So, I believe my hardware is set up properly. My program fails to configure the driver for stereo I think...
PIXELFORMATDESCRIPTOR pfd = {0};
pfd.nSize = sizeof (PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_GDI | PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_STEREO;
int iPixelFormat = ChoosePixelFormat(hdc, &pfd);
SetPixelFormat(hdc, iPixelFormat, &pfd);
iPixelFormat = GetPixelFormat(hdc);
DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
// test stereo mode acceptance by Windows
if ((pfd.dwFlags & PFD_STEREO) == 0)
MessageBoxError("Stereo mode not available!!!", "OpenGL");
else
MessageBoxInfo("Stereo mode available!!!", "OpenGL");
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?
That sounds ideal! :) I'm trying to write a red field on one eye and blue on the other for flip testing. But I can't seem to get Stereo mode enabled. :( According to NVIDIA Control Panel, stereoscopic 3D is enabled. And I can visualize 3D using their views. So, I believe my hardware is set up properly. My program fails to configure the driver for stereo I think...
PIXELFORMATDESCRIPTOR pfd = {0};
pfd.nSize = sizeof (PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_GDI | PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_STEREO;
int iPixelFormat = ChoosePixelFormat(hdc, &pfd);
SetPixelFormat(hdc, iPixelFormat, &pfd);
iPixelFormat = GetPixelFormat(hdc);
DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
// test stereo mode acceptance by Windows
if ((pfd.dwFlags & PFD_STEREO) == 0)
MessageBoxError("Stereo mode not available!!!", "OpenGL");
else
MessageBoxInfo("Stereo mode available!!!", "OpenGL");
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?
That sounds ideal! :) I'm trying to write a red field on one eye and blue on the other for flip testing. But I can't seem to get Stereo mode enabled. :( According to NVIDIA Control Panel, stereoscopic 3D is enabled. And I can visualize 3D using their views. So, I believe my hardware is set up properly. My program fails to configure the driver for stereo I think...
PIXELFORMATDESCRIPTOR pfd = {0};
pfd.nSize = sizeof (PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_GDI | PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_STEREO;
int iPixelFormat = ChoosePixelFormat(hdc, &pfd);
SetPixelFormat(hdc, iPixelFormat, &pfd);
iPixelFormat = GetPixelFormat(hdc);
DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
// test stereo mode acceptance by Windows
if ((pfd.dwFlags & PFD_STEREO) == 0)
MessageBoxError("Stereo mode not available!!!", "OpenGL");
else
MessageBoxInfo("Stereo mode available!!!", "OpenGL");
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?
That sounds ideal! :) I'm trying to write a red field on one eye and blue on the other for flip testing. But I can't seem to get Stereo mode enabled. :( According to NVIDIA Control Panel, stereoscopic 3D is enabled. And I can visualize 3D using their views. So, I believe my hardware is set up properly. My program fails to configure the driver for stereo I think...
PIXELFORMATDESCRIPTOR pfd = {0};
pfd.nSize = sizeof (PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_GDI | PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_STEREO;
int iPixelFormat = ChoosePixelFormat(hdc, &pfd);
SetPixelFormat(hdc, iPixelFormat, &pfd);
iPixelFormat = GetPixelFormat(hdc);
DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
// test stereo mode acceptance by Windows
if ((pfd.dwFlags & PFD_STEREO) == 0)
MessageBoxError("Stereo mode not available!!!", "OpenGL");
else
MessageBoxInfo("Stereo mode available!!!", "OpenGL");
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?
PIXELFORMATDESCRIPTOR pfd = {0};
pfd.nSize = sizeof (PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_GDI | PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_STEREO;
int iPixelFormat = ChoosePixelFormat(hdc, &pfd);
SetPixelFormat(hdc, iPixelFormat, &pfd);
iPixelFormat = GetPixelFormat(hdc);
DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
// test stereo mode acceptance by Windows
if ((pfd.dwFlags & PFD_STEREO) == 0)
MessageBoxError("Stereo mode not available!!!", "OpenGL");
else
MessageBoxInfo("Stereo mode available!!!", "OpenGL");
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?[/quote]
The code looks ok.
What graphics card are you using? It needs to be a Quadro version that uses a G80 GPU or later.
Do you have the NVIDIA stereo driver enabled? I might not be using the correct name because we don't install it - the part of the 3D Vision software that is used to display DirectX games in stereo. I think this has to be disabled for the OpenGL quad-buffered stereo to work.
I'm not up to date on the version of C++ Builder that you are using but I did run into a problem when I first started developing stereo apps with C++ Builder version 1.0. An application may only set the pixel format of a window one time. Once a window's pixel format is set, it cannot be changed. I was using the Builder VCL panel component for my window and the pixel format was being set before I had control. I had to write my own custom panel component so that I could be the one to set the pixel format.
PIXELFORMATDESCRIPTOR pfd = {0};
pfd.nSize = sizeof (PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_GDI | PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_STEREO;
int iPixelFormat = ChoosePixelFormat(hdc, &pfd);
SetPixelFormat(hdc, iPixelFormat, &pfd);
iPixelFormat = GetPixelFormat(hdc);
DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
// test stereo mode acceptance by Windows
if ((pfd.dwFlags & PFD_STEREO) == 0)
MessageBoxError("Stereo mode not available!!!", "OpenGL");
else
MessageBoxInfo("Stereo mode available!!!", "OpenGL");
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?
The code looks ok.
What graphics card are you using? It needs to be a Quadro version that uses a G80 GPU or later.
Do you have the NVIDIA stereo driver enabled? I might not be using the correct name because we don't install it - the part of the 3D Vision software that is used to display DirectX games in stereo. I think this has to be disabled for the OpenGL quad-buffered stereo to work.
I'm not up to date on the version of C++ Builder that you are using but I did run into a problem when I first started developing stereo apps with C++ Builder version 1.0. An application may only set the pixel format of a window one time. Once a window's pixel format is set, it cannot be changed. I was using the Builder VCL panel component for my window and the pixel format was being set before I had control. I had to write my own custom panel component so that I could be the one to set the pixel format.
PIXELFORMATDESCRIPTOR pfd = {0};
pfd.nSize = sizeof (PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_GDI | PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_STEREO;
int iPixelFormat = ChoosePixelFormat(hdc, &pfd);
SetPixelFormat(hdc, iPixelFormat, &pfd);
iPixelFormat = GetPixelFormat(hdc);
DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
// test stereo mode acceptance by Windows
if ((pfd.dwFlags & PFD_STEREO) == 0)
MessageBoxError("Stereo mode not available!!!", "OpenGL");
else
MessageBoxInfo("Stereo mode available!!!", "OpenGL");
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?[/quote]
The code looks ok.
What graphics card are you using? It needs to be a Quadro version that uses a G80 GPU or later.
Do you have the NVIDIA stereo driver enabled? I might not be using the correct name because we don't install it - the part of the 3D Vision software that is used to display DirectX games in stereo. I think this has to be disabled for the OpenGL quad-buffered stereo to work.
I'm not up to date on the version of C++ Builder that you are using but I did run into a problem when I first started developing stereo apps with C++ Builder version 1.0. An application may only set the pixel format of a window one time. Once a window's pixel format is set, it cannot be changed. I was using the Builder VCL panel component for my window and the pixel format was being set before I had control. I had to write my own custom panel component so that I could be the one to set the pixel format.
PIXELFORMATDESCRIPTOR pfd = {0};
pfd.nSize = sizeof (PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_GDI | PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_STEREO;
int iPixelFormat = ChoosePixelFormat(hdc, &pfd);
SetPixelFormat(hdc, iPixelFormat, &pfd);
iPixelFormat = GetPixelFormat(hdc);
DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
// test stereo mode acceptance by Windows
if ((pfd.dwFlags & PFD_STEREO) == 0)
MessageBoxError("Stereo mode not available!!!", "OpenGL");
else
MessageBoxInfo("Stereo mode available!!!", "OpenGL");
My test fails as the MessageBox indicates stereo mode is not available. Am I missing something?
The code looks ok.
What graphics card are you using? It needs to be a Quadro version that uses a G80 GPU or later.
Do you have the NVIDIA stereo driver enabled? I might not be using the correct name because we don't install it - the part of the 3D Vision software that is used to display DirectX games in stereo. I think this has to be disabled for the OpenGL quad-buffered stereo to work.
I'm not up to date on the version of C++ Builder that you are using but I did run into a problem when I first started developing stereo apps with C++ Builder version 1.0. An application may only set the pixel format of a window one time. Once a window's pixel format is set, it cannot be changed. I was using the Builder VCL panel component for my window and the pixel format was being set before I had control. I had to write my own custom panel component so that I could be the one to set the pixel format.