Login  Register

Re: blank screen by shader render

Posted by Sven Gothel on Mar 30, 2012; 3:48pm
URL: https://forum.jogamp.org/blank-screen-by-shader-render-tp3848071p3871213.html

On 03/30/2012 02:32 AM, Wade Walker [via jogamp] wrote:
>
>
> Sorry to not give you more specific advice, but I'd say to just go through
> every GL function call carefully, checking all arguments for type, value,
> length, et cetera. Usually I check my code against examples online to make
> sure I'm using each function correctly.
>

You can try setting -Djogl.debug.TraceGL and  -Djogl.debug.DebugGL
system properties. The latter option will end your program in case of an GL error.

If you use our ShaderUtil class to handle the shader code (load, compile,
link, ..) you can also set: -Djogl.debug.GLSLCode
which verifies the shader a bit more thoroughly and dumps it on the console.
Read our ShaderCode and ShaderUtil[s] class about how to verify the code.

Maybe the GL trace discloses the missing piece, like enabling an attribute,
passing a proper PMV matrix uniform, etc ..
Usually it's just one of the 2 above.

> If it makes you feel any better, I think every GL program I've ever written
> comes up with a blank screen initially  But if you persevere, eventually it
> will work.

indeed :)

~Sven


signature.asc (910 bytes) Download Attachment