Hi All. I am having a strange issue here. I am writing GL 3.3 based app. There are pretty no examples on programmable pipeline in JOGL (and if there are I will be happy to get refs :) So I am using my experience from CPP . What I have for now is a simple scene drawing a triangle .I am using Netbeans 7.1.2 + Win 7 64bit. ,GPU GForce 8600GT GL Version =3.3 .
When I launch the app sometimes it shows up the triangle all right but in most of the cases it gets a black screen with the following in the output : Exception in thread "Timer-0" java.lang.RuntimeException: javax.media.opengl.GLException: Thread[AWT-EventQueue-0,6,main] glGetError() returned the following error codes after a call to glViewport(<int> 0x0, <int> 0x0, <int> 0x318, <int> 0x23D): GL_INVALID_OPERATION ( 1282 0x502), at jogamp.common.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58) at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103) at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:206) at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172) at javax.media.opengl.Threading.invoke(Threading.java:191) at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:405) at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:74) at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:142) at com.jogamp.opengl.util.FPSAnimator$1.run(FPSAnimator.java:128) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Caused by: javax.media.opengl.GLException: Thread[AWT-EventQueue-0,6,main] glGetError() returned the following error codes after a call to glViewport(<int> 0x0, <int> 0x0, <int> 0x318, <int> 0x23D): GL_INVALID_OPERATION ( 1282 0x502), at javax.media.opengl.DebugGL3.checkGLGetError(DebugGL3.java:9697) at javax.media.opengl.DebugGL3.glViewport(DebugGL3.java:7753) at jogamp.opengl.GLDrawableHelper.reshape(GLDrawableHelper.java:202) at jogamp.opengl.GLDrawableHelper.reshape(GLDrawableHelper.java:210) at javax.media.opengl.awt.GLCanvas$6.run(GLCanvas.java:845) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364) at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:864) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:701) at java.awt.EventQueue.access$000(EventQueue.java:102) at java.awt.EventQueue$3.run(EventQueue.java:662) at java.awt.EventQueue$3.run(EventQueue.java:660) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:671) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139) at java.awt.EventDispatchThread.run(EventDispatchThread.java:97) That is strange because I tried even not to call glViewport at all and still I am getting it occasionally .What do I miss here? Thanks . |
Administrator
|
On 05/24/2012 08:51 PM, sasmaster [via jogamp] wrote:
> Hi All. I am having a strange issue here. I am writing GL 3.3 based app. There > are pretty no examples on programmable pipeline in JOGL (and if there are I > will be happy to get refs :) So I am using my experience from CPP . What I > have for now is a simple scene drawing a triangle .I am using Netbeans 7.1.2 > + Win 7 64bit. ,GPU GForce 8600GT GL Version =3.3 . > When I launch the app sometimes it shows up the triangle all right but in > most of the cases it gets a black screen with the following in the output : I assume you get the below trace by enabling our GL debug pipeline either by an explicit manual GL pipeline creation or by setting the Java system property: 'jogl.debug.DebugGL' ? > > Caused by: javax.media.opengl.GLException: Thread[AWT-EventQueue-0,6,main] > glGetError() returned the following error codes after a call to > glViewport(<int> 0x0, <int> 0x0, <int> 0x318, <int> 0x23D): > GL_INVALID_OPERATION ( 1282 0x502), > at javax.media.opengl.DebugGL3.checkGLGetError(DebugGL3.java:9697) > at javax.media.opengl.DebugGL3.glViewport(DebugGL3.java:7753) > at jogamp.opengl.GLDrawableHelper.reshape(GLDrawableHelper.java:202) > at jogamp.opengl.GLDrawableHelper.reshape(GLDrawableHelper.java:210) > at javax.media.opengl.awt.GLCanvas$6.run(GLCanvas.java:845) > at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425) > at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364) > at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:864) > That is strange because I tried even not to call glViewport at all and still I > am getting it occasionally . As you can see in the stack trace, JOGL's GLDrawableHelper calls it in case a reshape/resize happens, this is intended. > What do I miss here? Maybe: http://www.opengl.org/sdk/docs/man/xhtml/glViewport.xml "GL_INVALID_OPERATION is generated if glViewport is executed between the execution of glBegin and the corresponding execution of glEnd." But the above is sort of odd, since you explicitly mention GL >= 3.3 and the programmable pipeline. The latter app won't use immediate mode w/ glBegin/glEnd but VBOs. Don't know if this helps .. ~Sven > Thanks . signature.asc (910 bytes) Download Attachment |
It doesn't really help to understand what is the problem.For example now I try to setup a renderer where I use a timer for render loops and init a GLCanvas and context in a separate class.So when the overriden reshape() is called ( even if I remove glViewport) I am getting this :
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Thread[AWT-EventQueue-0,6,main] glGetError() returned the following error codes after a call to glViewport(<int> 0x0, <int> 0x0, <int> 0x318, <int> 0x23D): GL_INVALID_ENUM ( 1280 0x500), at javax.media.opengl.DebugGL3.checkGLGetError(DebugGL3.java:9697) at javax.media.opengl.DebugGL3.glViewport(DebugGL3.java:7753) at jogamp.opengl.GLDrawableHelper.reshape(GLDrawableHelper.java:202) at jogamp.opengl.GLDrawableHelper.reshape(GLDrawableHelper.java:210) at javax.media.opengl.awt.GLCanvas$6.run(GLCanvas.java:845) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364) at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:864) at javax.media.opengl.Threading.invoke(Threading.java:193) at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:405) at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:482) at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264) at sun.awt.RepaintArea.paint(RepaintArea.java:240) at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:347) at java.awt.Component.dispatchEventImpl(Component.java:4937) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703) at java.awt.EventQueue.access$000(EventQueue.java:102) at java.awt.EventQueue$3.run(EventQueue.java:662) at java.awt.EventQueue$3.run(EventQueue.java:660) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:676) at java.awt.EventQueue$4.run(EventQueue.java:674) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:673) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139) at java.awt.EventDispatchThread.run(EventDispatchThread.java:97) I have no clue why I am getting it ! Any suggestions ? |
In reply to this post by Sven Gothel
It doesn't really help to understand what is the problem.For example now I try to setup a renderer where I use a timer for render loops and init a GLCanvas and context in a separate class.So when the overriden reshape() is called ( even if I remove glViewport) I am getting this :
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Thread[AWT-EventQueue-0,6,main] glGetError() returned the following error codes after a call to glViewport(<int> 0x0, <int> 0x0, <int> 0x318, <int> 0x23D): GL_INVALID_ENUM ( 1280 0x500), at javax.media.opengl.DebugGL3.checkGLGetError(DebugGL3.java:9697) at javax.media.opengl.DebugGL3.glViewport(DebugGL3.java:7753) at jogamp.opengl.GLDrawableHelper.reshape(GLDrawableHelper.java:202) at jogamp.opengl.GLDrawableHelper.reshape(GLDrawableHelper.java:210) at javax.media.opengl.awt.GLCanvas$6.run(GLCanvas.java:845) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364) at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:864) at javax.media.opengl.Threading.invoke(Threading.java:193) at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:405) at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:482) at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264) at sun.awt.RepaintArea.paint(RepaintArea.java:240) at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:347) at java.awt.Component.dispatchEventImpl(Component.java:4937) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703) at java.awt.EventQueue.access$000(EventQueue.java:102) at java.awt.EventQueue$3.run(EventQueue.java:662) at java.awt.EventQueue$3.run(EventQueue.java:660) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:676) at java.awt.EventQueue$4.run(EventQueue.java:674) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:673) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139) at java.awt.EventDispatchThread.run(EventDispatchThread.java:97) I have no clue why I am getting it ! Any suggestions ? |
In reply to this post by sasmaster
Resurrecting stale thread because it is unanswered and still relevant...
This appears to happen when a gl error occurs in the init() method. Instead of giving a relevant stack trace it ends up becoming obfuscated by JOGL. As a workaround, I found that invoking my own flavor of init() method from display() on the first invocation of display() does roughly the same thing, minus the stack trace obfuscation. |
Administrator
|
Hi
Why not giving us a small test case to demonstrate that by intentionally causing an OpenGL error (for example by calling glBegin(), glViewport and glEnd())?
Julien Gouesse | Personal blog | Website
|
Free forum by Nabble | Edit this page |