Reg:Jogl Display callback.

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

Reg:Jogl Display callback.

anandcta123
Dear All,

I am working on Jogl GLJPanel video display using Swing JDesktopPane and JInternalFrames. Actually I need to display video. But I am suffering from fps rate of FPSAnimator which will call GLEventListner display function. Till 10 GLJPanel's (One for each JInternalFrame), I can get 30fps rate. But as it increases beyond like for 12 GLJPanel's, fps rate will decrease's to 25fps and for 16 GLJPanel's fps rate will decrease to 20fps. Here in GLJPanel display function, currently I am not calling any GL functions to draw video frames (It will only call glClear). Please suggest whether this is default behaviour of JOGL or any way is there to fix this.
 
Thanks and Regards,
Anand
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

gouessej
Administrator
Hi

Which operations are the most time consuming in your case? I'm not sure the problem really comes from JOGL. Have you ever used Animator instead of FPSAnimator?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

Sven Gothel
Administrator
In reply to this post by anandcta123
On 11/15/2013 06:03 AM, anandcta123 [via jogamp] wrote:

> Dear All,
>
> I am working on Jogl GLJPanel video display using Swing JDesktopPane and
> JInternalFrames. Actually I need to display video. But I am suffering from fps
> rate of FPSAnimator which will call GLEventListner display function. Till 10
> GLJPanel's (One for each JInternalFrame), I can get 30fps rate. But as it
> increases beyond like for 12 GLJPanel's, fps rate will decrease's to 25fps and
> for 16 GLJPanel's fps rate will decrease to 20fps. Here in GLJPanel display
> function, currently I am not calling any GL functions to draw video frames (It
> will only call glClear). Please suggest whether this is default behaviour of
> JOGL or any way is there to fix this.
>  
GLJPanel employs many extra tasks to bring the GL rendered pixels
to the visible surface - pls read the GLJPanel API documentation.

Recently a feature to skip vertical flipping has been introduced
and will be part of 2.1.3:
  <http://forum.jogamp.org/GLJPanel-Skip-Vertical-Flip-Performance-Tweak-Bug-904-td4030632.html>

Other than that GLJPanel still needs to ReadPixels and AWT
will composite the pixels - hence it will always be slower
than direct rendering onscreen, or native compositioning (OSX).

Further more, the OpenGL driver may reduce performance,
i.e. one of the applet-tests[1,2] using multiple
GLJPanels works slow (~ 10fps) on X11-NV, OSX 10.7-NV,
but quite fast (60 fps) on OSX 10.9-NV and Windows-NV.

This might be related to vertical synchronization applied to all GLEventListeners,
but may also be due to slow FBO handling or AWT compositioning.

General performance is currently under investigation and if you like to join
this task and share your results and patches, your are very welcome.

[1] http://jogamp.org/deployment/jogamp-current/jogl-test-applets.html
[2] http://jogamp.org/deployment/jogamp-current/jogl-applet-bug848_glcanvas01.html

~Sven

--
health & wealth
mailto:[hidden email] ; http://jausoft.com
land : +49 (471) 4707742 ; fax : +49 (471) 4707741
Timezone CET: PST+9, EST+6, UTC+1


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

anandcta123
In reply to this post by gouessej
Hi,

Thanks for your reply.

Ya I used Animator. Also I implemented GLAnimatorControl and called display function myself in a separate thread with less sleep delay. But still it gave me 20fps for 16 GLJPanel's (Each one is embedded inside one JInternalFrame and all JInternalFrames are inside JDesktopPane). Also inside display function just I am clearing the window with black color and not actually doing any rendering.

Is this is JOGL performance issue.

Thanks and Regards,
Anand
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

gouessej
Administrator
anandcta123 wrote
Is this is JOGL performance issue.
Sven is probably right and as you do almost nothing inside the display method, the performance issue may come from GLJPanel.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

anandcta123

Hi,

Then I won't be able to get any solution for this issue.

If not able to get a solution, is any other way to go for video display of Uncompressed RGB video frames in Java (Currently I am using old JMF).

Thanks and Regards,
Anand
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

Sven Gothel
Administrator
On 11/15/2013 01:41 PM, anandcta123 [via jogamp] wrote:
>
> Hi,
>
> Then I won't be able to get any solution for this issue.
>
> If not able to get a solution, is any other way to go for video display of
> Uncompressed RGB video frames in Java (Currently I am using old JMF).

The issue at hand is not our GLMediaPlayer framework,
but usage of GLJPanel.

You maybe able to use a heavyweight GLCanvas
or even NEWT's GLWindow w/ NewtCanvasAWT for better performance.

Yes, if you must use GLJPanel for lightweight integration
and performance is not matching your requirements you either:
  - cooperate and contribute to solve the issue, if possible
  - must choose another lightweight solution ..

Make sure you test w/ latest 2.1.3 RC (find post in subforum general).

~Sven

>
> Thanks and Regards,
> Anand


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

anandcta123
Hi,

I am trying to download 2.1.3. But there is no option to download 2.1.3. Only version 2.1.2 can be downloaded. Please help me how to download this. Also there is a link to 2.2.0 release, but this also I can't able to download. Whether are still under development.

Thanks and Regards,
Anand
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

Xerxes Rånby
anandcta123 wrote
Hi,

I am trying to download 2.1.3. But there is no option to download 2.1.3. Only version 2.1.2 can be downloaded. Please help me how to download this. Also there is a link to 2.2.0 release, but this also I can't able to download. Whether are still under development.

Thanks and Regards,
Anand
Please follow the 2.1.3-rc-20131111 download link from the forum thread:
http://forum.jogamp.org/2-1-3-rc-20131111-Mardi-Gras-RC-tp4030585.html

This is the 2.1.3-rc-20131111 pre release:
http://jogamp.org/deployment/archive/master/gluegen_746-joal_499-jogl_1146-jocl_875-signed/archive/jogamp-all-platforms.7z
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

anandcta123
I downloaded the JOGL 2.1.3 version from the path you specified and built my project using this. I observed same issue with fps rate as my previous discussions. No improvements.

Thanks and Regards,
Anand
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

Xerxes Rånby
anandcta123 wrote
I downloaded the JOGL 2.1.3 version from the path you specified and built my project using this. I observed same issue with fps rate as my previous discussions. No improvements.

Thanks and Regards,
Anand
Did you change your code to test the new GLJPanel setSkipGLOrientationVerticalFlip(true) functionality introduced with the 2.1.3 release candidate ?
https://jogamp.org/bugzilla/show_bug.cgi?id=904

Please share your project and code under a free software license if you want help how to rewrite your code to replace the AWT GLJPanel (s) with a faster solution using AWT GLCanvas or NEWT GLWindow + NewtCanvasAWT.
http://jogamp.org/jogl/doc/NEWT-Overview.html

Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

Sven Gothel
Administrator
In reply to this post by anandcta123
On 11/15/2013 10:51 AM, Sven Gothel wrote:

> On 11/15/2013 06:03 AM, anandcta123 [via jogamp] wrote:
>> Dear All,
>>
>> I am working on Jogl GLJPanel video display using Swing JDesktopPane and
>> JInternalFrames. Actually I need to display video. But I am suffering from fps
>> rate of FPSAnimator which will call GLEventListner display function. Till 10
>> GLJPanel's (One for each JInternalFrame), I can get 30fps rate. But as it
>> increases beyond like for 12 GLJPanel's, fps rate will decrease's to 25fps and
>> for 16 GLJPanel's fps rate will decrease to 20fps. Here in GLJPanel display
>> function, currently I am not calling any GL functions to draw video frames (It
>> will only call glClear). Please suggest whether this is default behaviour of
>> JOGL or any way is there to fix this.
>>  
>
> GLJPanel employs many extra tasks to bring the GL rendered pixels
> to the visible surface - pls read the GLJPanel API documentation.
>
> Recently a feature to skip vertical flipping has been introduced
> and will be part of 2.1.3:
>   <http://forum.jogamp.org/GLJPanel-Skip-Vertical-Flip-Performance-Tweak-Bug-904-td4030632.html>
>
> Other than that GLJPanel still needs to ReadPixels and AWT
> will composite the pixels - hence it will always be slower
> than direct rendering onscreen, or native compositioning (OSX).
>
> Further more, the OpenGL driver may reduce performance,
> i.e. one of the applet-tests[1,2] using multiple
> GLJPanels works slow (~ 10fps) on X11-NV, OSX 10.7-NV,
> but quite fast (60 fps) on OSX 10.9-NV and Windows-NV.
Only using V-Sync on one of many GLJPanel solves
performance degradation w/ X11/NV:
  <http://jogamp.org/deployment/archive/master/gluegen_751-joal_502-jogl_1153-jocl_879-signed/jogl-applet-bug848_glcanvas01.html>

Yes, this is the new RC:
  2.1.3-rc-20131117:
    - our-maven
    - http://jogamp.org/deployment/archive/master/gluegen_751-joal_502-jogl_1153-jocl_879/
    - http://jogamp.org/deployment/archive/master/gluegen_751-joal_502-jogl_1153-jocl_879-signed/

~Sven

>
> This might be related to vertical synchronization applied to all GLEventListeners,
> but may also be due to slow FBO handling or AWT compositioning.
>
> General performance is currently under investigation and if you like to join
> this task and share your results and patches, your are very welcome.
>
> [1] http://jogamp.org/deployment/jogamp-current/jogl-test-applets.html
> [2] http://jogamp.org/deployment/jogamp-current/jogl-applet-bug848_glcanvas01.html
>
> ~Sven
>
>> Thanks and Regards,
>> Anand


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

anandcta123
In reply to this post by Xerxes Rånby
Thank you very much. With your Jogl 2.1.3 looks like improved and Jogl Display function calling me at faster rate as expected (Actually I removed my old Eclipse and downloaded new eclipse, with I configured and tested my project). But I am getting "Info: GLDrawableHelper.reshape: pre-existing GL error 0x500" message on Eclipse console. Please tell me, what this means.

Thanks and Regards,
Anand
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

gouessej
Administrator
It means GL_INVALID_ENUM:
http://www.opengl.org/wiki/OpenGL_Error
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

anandcta123
The fps analysis I have reported about JOGL behaviour is on MAC. If I build and run the tests using Java SE 6, in the logs I can observe 30fps rate for 16 GLJPanel's. But if I run the same tests using JRE Java SE 7 or 8(pre-release), the fps rate is degrading. I don't understand why this is happening on MAC. As I know, on OSX they depreciated Java as primary development language. If I install, Java Se 7 or 8(pre-release), it will intsall in a seperate Library folder. Please tell me, why this is behaving like this, if I use Java SE 7 or 8.

Thanks and Regards,
Anand
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

gouessej
Administrator
Hi

Apple Java SE 1.6 and Oracle Java 1.7 (1.8 too) use different implementations of Swing, the latter is a bit "young" and not fully optimized.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

anandcta123
Hi,

I have seen jogl 2.2.0 in RoadMaps section of JOGL. When it will be available for download. Any idea.

Anand
Reply | Threaded
Open this post in threaded view
|

Re: Reg:Jogl Display callback.

Xerxes Rånby
anandcta123 wrote
Hi,

I have seen jogl 2.2.0 in RoadMaps section of JOGL. When it will be available for download. Any idea.

Anand
work on 2.2.0 will be started first after 2.1.3 is complete and perfect.
2.1.3 contains all  the latest polished code inside the jogamp, jogl, joal, jocl, gluegen and demo repository’s
http://jogamp.org/wiki/index.php/SW_Tracking_Report_Objectives_for_the_release_2.1.3

2.2.0 currently only contains ideas and blueprints for new enhancements
http://jogamp.org/wiki/index.php/SW_Tracking_Report_Objectives_for_the_release_2.2.0