Login  Register

Re: What can i await as status

Posted by Sven Gothel on Feb 04, 2013; 4:26pm
URL: https://forum.jogamp.org/What-can-i-await-as-status-after-linking-shaders-tp4028126p4028127.html

On 02/04/2013 05:13 PM, adi [via jogamp] wrote:

> Hi
>
> What can in await in the buffer after linking my shaders?
>
> *int linked[] = new int[1];
> gl.glLinkProgram(shaderProgram);
> gl.glGetProgramiv(shaderProgram, GL4.GL_LINK_STATUS, linked,0);*
>  
> is linked[0]==0  OK
> or an error?
> The documentation says nothing.
https://www.opengl.org/sdk/docs/man4/xhtml/glGetProgram.xml

.. it says a lot :)

Pls be aware that we do not copy the OpenGL spec in JOGL,
hence you may want to read the HTML references or the
OpenGL spec itself, i.e.
  http://www.opengl.org/registry/doc/glspec42.core.20120119.withchanges.pdf

We use this shader state to validate program link validity as well:

http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java;h=eceeea6db965d283f71766d531d27687d486411f;hb=HEAD#l104

~Sven



signature.asc (911 bytes) Download Attachment