Login  Register

Re: Some issues using NEWT

Posted by Sven Gothel on Feb 25, 2012; 12:49am
URL: https://forum.jogamp.org/Some-issues-using-NEWT-tp3757230p3774174.html

On 02/25/2012 01:21 AM, ac [via jogamp] wrote:

>
>
>> This is because of using the OSX CALayer (offscreen animation layer),
>> which has it's own static refresh cycle.
>>
>> We need to tune this code path (if possible), eg. hand 'down' the fps
>> values.
>> Pls create a bug report - if you don't mind.
>
> Mostly out of curiosity (since I don't think I have enough knowledge to
> tackle this bug myself), what is the source code file in jogl where the
> framerate of the OSX CALayer could be controlled? At least I'd like to take
> a look, maybe some idea or suggestion will come up :-)
>
It's all in one file, pretty much isolated and orthogonal,
so possible to fix it w/o overall system knowledge.

Setup here:

<http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m;hb=HEAD#l127>

A note:

<http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m;hb=HEAD#l260>

SetSwapInterval (NOP with CALayer):

<http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m;hb=HEAD#l360>

If you know a way how to control the swap interval at least,
that would be great.

Technically the JOGL 'user' code provides a texture from
rendering into the pbuffer.

The CALayer renders the textures into
whatever the 'sink' is from it's own animation thread.

If we would have at least a vsync (swap interval),
we could sync rendering properly.

It's highly likely that I am missing something here.

~Sven



signature.asc (910 bytes) Download Attachment