CapabilitiesChooser not called on Mac OS X and for offscreen drawables (JOGL 2.0-rc11)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CapabilitiesChooser not called on Mac OS X and for offscreen drawables (JOGL 2.0-rc11)

InteractiveMesh
I. AWT / Mac OS X : onscreen

When calling "GraphicsConfigurationFactory.chooseGraphicsConfiguration(... , CapabilitiesChooser chooser, ...)" my chooser's chooseCapabilities-method is invoked on Linux and Windows but never on Mac. A look into the Mac related sources confirms that the chooser doesn't seem to be called.

Do I have to repeat the call "chooseGraphicsConfiguration" with different capabilties until the returned AWTGraphicsConfiguration has the (approximately) appropriate capabilties?  

II. all platforms : offscreen (FBO, pbuffer)

When creating an offscreen GLDrawable by calling GLDrawableFactory.createOffscreenDrawable(..., GLCapabilitiesChooser chooser, ...) my chooser is neither invoked. The sources seem to confirm this also.
     
Is repeatedly calling the solution here as well?    
   
August
Reply | Threaded
Open this post in threaded view
|

Re: CapabilitiesChooser not called on Mac OS X and for offscreen drawables (JOGL 2.0-rc11)

Sven Gothel
Administrator
On 12/19/2012 07:19 PM, InteractiveMesh [via jogamp] wrote:

> I. AWT / Mac OS X : onscreen
>
> When calling "GraphicsConfigurationFactory.chooseGraphicsConfiguration(... ,
> CapabilitiesChooser chooser, ...)" my chooser's chooseCapabilities-method is
> invoked on Linux and Windows but never on Mac. A look into the Mac related
> sources confirms that the chooser doesn't seem to be called.
>
> Do I have to repeat the call "chooseGraphicsConfiguration" with different
> capabilties until the returned AWTGraphicsConfiguration has the
> (approximately) appropriate capabilties?  
>
> II. all platforms : offscreen (FBO, pbuffer)
>
> When creating an offscreen GLDrawable by calling
> GLDrawableFactory.createOffscreenDrawable(..., GLCapabilitiesChooser chooser,
> ...) my chooser is neither invoked. The sources seem to confirm this also.
>      
> Is repeatedly calling the solution here as well?    
In case FBO backend/impl. is being used, you are right,
the 'final' GLCaps.. after context has been made current is determined
by GLFBODrawableImpl/FBObject - fixed code.

Reason is that there is not much room for selecting the GLCaps..,
just the DEPTH/STENCIL and MSAA bits - and we choose the nearest or best avail.
We could impl. using a chooser, but I am not sure whether this makes much sense.
The only valid choice comes to mind though would be of the MSAA bits .. hmm.

+++

For pbuffer the chooser shall be invoked, since we follow the
normal pattern of 'visual' selection here.
However, to enforce pbuffer w/ createOffscreen*(..) you have to
make some settings to the requested GLCaps (fbo=false, pbuffer=true).
In case this is an offscreen CALayer of OSX, you also have to set onscreen=true
afterwards - this 'magic' is used in the unit tests within TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.

~Sven

>    
> August
>


signature.asc (909 bytes) Download Attachment