Login  Register

Viewport errors in GL3.0

Posted by sasmaster on May 24, 2012; 6:51pm
URL: https://forum.jogamp.org/Viewport-errors-in-GL3-0-tp4014062.html

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 .