Login  Register

Re: Texture rendering performance problems

Posted by Demoscene Passivist on Jul 15, 2010; 10:51am
URL: https://forum.jogamp.org/Texture-rendering-performance-problems-tp966089p969177.html

Ok if the GLCanvas work perfectly then ur problem is lost/no hardware acceleration wich is ofcourse slow. What u can try is to use these two VM switches:

-Dsun.java2d.opengl=true
-Dsun.java2d.noddraw=true

The first forces Java2D to use OpenGL under Windows instead of DirectDraw/Direct3D. The second works around a lowlevel driver incompatibility (needed for correct fullscreen support anyway). At least that worked for me when I got the same problem under Vista.

The other option is not to use GLJPanel and instead to use the GLCanvas. If u only want good Java2D support and do not need any Swing components inside/overlayed ur rendered graphics, a combination of GLCanvas and TextureRenderer is the way to go. Take a look here: http://jogamp.org/deployment/jogl-next/javadoc_public/com/jogamp/opengl/util/awt/TextureRenderer.html

The TextureRenderer also eases u from the problem of manually uploading ur textures and the texture format performance problems discussed before. Performance wise u can easily upload a 1280x1024 texture with 60 frames per second that way. So I guess for ur video application GLCanvas+TextureRenderer is the most easy, compatible and high-performance way.