No glDebugMessageCallback in javax.media.opengl.GL4

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

No glDebugMessageCallback in javax.media.opengl.GL4

ericg
I noticed that there is no glDebugMessageCallback function in javax.media.opengl.GL4 where the openGL docs state that there is one in GL4.  Is there a reason why it has not been implemented?  Is there an equivalent function that can be used?
Reply | Threaded
Open this post in threaded view
|

Re: No glDebugMessageCallback in javax.media.opengl.GL4

gouessej
Administrator
Do you mean glDebugMessageControl?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: No glDebugMessageCallback in javax.media.opengl.GL4

ericg
No, it is here: https://www.opengl.org/sdk/docs/man/html/glDebugMessageCallback.xhtml.  I am more curious than actually really needing this as I do use try catch and log errors accordingly.  Perhaps it is because Java does not implement callbacks the same way C does?
Reply | Threaded
Open this post in threaded view
|

Re: No glDebugMessageCallback in javax.media.opengl.GL4

Sven Gothel
Administrator
On 10/14/2014 02:58 AM, ericg [via jogamp] wrote:
> No, it is here:
> https://www.opengl.org/sdk/docs/man/html/glDebugMessageCallback.xhtml.  I am
> more curious than actually really needing this as I do use try catch and log
> errors accordingly.  Perhaps it is because Java does not implement callbacks
> the same way C does?

It is all there, i.e. via our own native -> java callback wrappers,
see
 javax.media.opengl.GLDebugListener;
 javax.media.opengl.GLDebugMessage;

Unit tests:

http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug00NEWT.java;h=50beb8ab937b25c91222490aa17f0fc85b4189f4;hb=HEAD

http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug01NEWT.java;h=74280409217ad40eafd8f15d745c204fc8438d9f;hb=HEAD



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

Re: No glDebugMessageCallback in javax.media.opengl.GL4

ericg
Those test look similar to what I am doing with likely the same effect:

drawable.setGL(new DebugGL4(drawable.getGL().getGL4()));

This gives me great error/stacktrace output with line numbers etc.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: No glDebugMessageCallback in javax.media.opengl.GL4

Sven Gothel
Administrator
On 10/15/2014 08:46 PM, ericg [via jogamp] wrote:
> Those test look similar to what I am doing with likely the same effect:
>
> drawable.setGL(new DebugGL4(drawable.getGL().getGL4()));
>
> This gives me great error/stacktrace output with line numbers etc.

Well, the debug pipeline alone just does the glGetError() checking
for each call.

Using sys property via cmdline '-Djogl.debug.DebugGL'
additionally enables the OpenGL debug context w/ default listener.

The demo code I have referenced additionally actually
injects debug messages and a hooks up a custom debug listener.

~Sven



signature.asc (828 bytes) Download Attachment