Login  Register

Re: Viewport errors in GL3.0

Posted by Sven Gothel on May 26, 2012; 7:50pm
URL: https://forum.jogamp.org/Viewport-errors-in-GL3-0-tp4014062p4017049.html

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