glGetBooleanv(GL_STEREO) faulty?
Hi
Our workstation has a nv idia Quadro FX 4600 and we set everything up for stereo,
and it works perfectly.

Now i want to write an OpenGL application which tries to find out whether the system supports stereo in order to set the correct dispolay mode:
[code]    GLboolean bStereo;
   glGetBooleanv(GL_STEREO, &bStereo);
   printf("stereo enabled: %d\n", stereo_enabled);
   if (bStereo) {
       glutInitDisplayMode(GLUT_RGB|GLUT_DEPTH|GLUT_DOUBLE|GLUT_STEREO);
   } else {
       glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
   }
[/code]
However the value of bStereo is not set to true (or 1 or whatever) on this system;
in fact, the value of bStereo is the same value it has been initialized with.

Or do i have to query for something else in order to find out whether
stereo is supported?

Jody
Hi

Our workstation has a nv idia Quadro FX 4600 and we set everything up for stereo,

and it works perfectly.



Now i want to write an OpenGL application which tries to find out whether the system supports stereo in order to set the correct dispolay mode:

   GLboolean bStereo;

   glGetBooleanv(GL_STEREO, &bStereo);

   printf("stereo enabled: %d\n", stereo_enabled);

   if (bStereo) {

       glutInitDisplayMode(GLUT_RGB|GLUT_DEPTH|GLUT_DOUBLE|GLUT_STEREO);

   } else {

       glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);

   }


However the value of bStereo is not set to true (or 1 or whatever) on this system;

in fact, the value of bStereo is the same value it has been initialized with.



Or do i have to query for something else in order to find out whether

stereo is supported?



Jody

#1
Posted 03/26/2008 01:26 PM   
--update--

i found out that [font="Courier"]glGetBooleanv()[/font] only works [b]after[/b]
[font="Courier"]glutCreateWindow()[/font] is called.
But at this point the display mode has already been set.

But if i use [font="Courier"]glutInitDisplayMode()[/font] with [font="Courier"]GLUT_STEREO[/font]
on a system without stereo capabilities, the program aborts:
[code]
freeglut (./oglA):  ERROR:  Internal error <Visual with necessary capabilities not found> in function fgOpenWindow
X Error of failed request:  BadWindow (invalid Window parameter)
 Major opcode of failed request:  4 (X_DestroyWindow)
 Resource id in failed request:  0x0
 Serial number of failed request:  14
 Current serial number in output stream:  17
[/code]

So how can i find out if the system is stereo capable [b]before[/b]
calling [font="Courier"]glutInitDisplayMode()[/font] and [font="Courier"]glutCreateWindow()[/font]??

Jody
--update--



i found out that glGetBooleanv() only works after

glutCreateWindow() is called.

But at this point the display mode has already been set.



But if i use glutInitDisplayMode() with GLUT_STEREO

on a system without stereo capabilities, the program aborts:



freeglut (./oglA):  ERROR:  Internal error <Visual with necessary capabilities not found> in function fgOpenWindow

X Error of failed request:  BadWindow (invalid Window parameter)

 Major opcode of failed request:  4 (X_DestroyWindow)

 Resource id in failed request:  0x0

 Serial number of failed request:  14

 Current serial number in output stream:  17




So how can i find out if the system is stereo capable before

calling glutInitDisplayMode() and glutCreateWindow()??



Jody

#2
Posted 03/28/2008 01:49 PM   
[quote name='jody.xha' post='352596' date='Mar 28 2008, 03:49 PM']--update--

i found out that [font="Courier"]glGetBooleanv()[/font] only works [b]after[/b]
[font="Courier"]glutCreateWindow()[/font] is called.
But at this point the display mode has already been set.

But if i use [font="Courier"]glutInitDisplayMode()[/font] with [font="Courier"]GLUT_STEREO[/font]
on a system without stereo capabilities, the program aborts:[/quote]

I'm having the exact same issue. Anyone?

- Yngve
[quote name='jody.xha' post='352596' date='Mar 28 2008, 03:49 PM']--update--



i found out that glGetBooleanv() only works after

glutCreateWindow() is called.

But at this point the display mode has already been set.



But if i use glutInitDisplayMode() with GLUT_STEREO

on a system without stereo capabilities, the program aborts:



I'm having the exact same issue. Anyone?



- Yngve

#3
Posted 05/13/2009 08:15 AM   
Scroll To Top