Login  Register

RE: How to enable quad-buffered stereo rendering

Posted by Rami Santina on Jul 06, 2010; 2:01pm
URL: https://forum.jogamp.org/How-to-enable-quad-buffered-stereo-rendering-tp938684p946438.html

Yup this is from a while ago when I was testing stereo with our application…

 

First of all can you paste the capabilities available (log file or just print the capabilities) and some info regarding graphic driver & model

 

PS: some new drivers from Nvidia come without quad buffer support (depending on card family) so check if you have quad buffered support.

 

Anyways for me to get it to work, I had to manually select the capabilities that include stereo. Since you might request some conflicting desired caps that doesn’t come when utilizing stereo.

Will have to check again if this is still valid…but anyways try it.

 

 

 

Override the choose capability function in DefaultCapabilitiesChooser

 

DefaultGLCapabilitiesChooser choiceExaminer = new DefaultGLCapabilitiesChooser()    {

                                                public int chooseCapabilities(GLCapabilities desired, GLCapabilities[] available, int windowSystemRecommendedChoice)

                                                {

                                                                int sysChosenCapIndex = super.chooseCapabilities(desired, available,windowSystemRecommendedChoice);                                             

 

int desiredCapIndex = …. Chose the one with stereo mode from the available caps.

 

return desiredCapIndex;

                                                }

};

….

 

GLCapabilities stereoCaps = new GLCapabilities();

stereoCaps.setStereo(true);

                               

                GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();

                               

                glcanvas = new GLCanvas(stereoCaps, choiceExaminer, null, device);

 

….

 

IF all you available caps are false for stereo, then the log/model/driver info would be helpful.

 

Hope it helps!

 

 

 

From: Sven Gothel [via jogamp] [mailto:[hidden email]]
Sent: Tuesday, July 06, 2010 4:39 PM
To: Rami Santina
Subject: Re: How to enable quad-buffered stereo rendering

 

On Sunday, July 04, 2010 21:22:04 michael.nischt [via jogamp] wrote:


>
> Michael, thanks for looking into this!
>
> Yes, the quad-buffered technique is around since a decade or so. When
> enabled, you simple draw the scene twice: once with
> glDrawBuffer(GL_BACK_LEFT) and then with glDrawBuffer(GL_BACK_RIGHT).
> Unfortunately, the last call results in a GL_INVALID_OPERATION since there
> are no right buffers because glGetBooleanv(GL_STEREO, ..) returns GL_FALSE.
>
> Setting Capabilites.setStereo(true) in the desired caps does not help. There
> reason is that the choosing is done by returning an index into the
> "available" array and all of the return false for getStereo(). Hence it is
> the same for "chosen" configuration.


Yep, our colleague Rami is aware of this too,
and a fix will be provided.

Thank you for the good description.

If you have time (and still a bit patience with JOGL),
you may like to provide a test case to reduce some overhead
and misunderstandings here.

>
> I assume it is a simple bug in Jogl querying/setting the stereo capability
> bit since in works in python with glutInitDisplayMode (GLUT STEREO..).
>
> Anyhow, I'll with try with the LWJGL tomorrow or on Tuesday and let you know
> if it works..
>
> Best,
>  Michael

Cheers, Sven


View message @ http://jogamp.762907.n3.nabble.com/How-to-enable-quad-buffered-stereo-rendering-tp938684p946403.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.