Good news
Posted by adi on Sep 04, 2014; 4:37am
URL: https://forum.jogamp.org/Good-news-tp4033046.html
Uniform Blocks works good with jogl.
I have tested it with some shaders und objects that make bindings to
the projection matrix on a NVIDEA GTX TITAN Z and GTX 780.
The vertex shader source is:
#version 440 core
layout (location=0) in vec4 position;
layout (location=5) uniform dmat4 modelViewMatrix;
layout (location=2)out vec3 texCoord;
layout (shared,binding=0) uniform GlobalDatas {
dmat4 projectionsMatrix;
};
layout (shared,binding=1) uniform GlobalDatasDynamic {
dvec3 cameraPosition;
};
void main()
{
texCoord = position.xyz;
dvec4 posi = projectionsMatrix*modelViewMatrix*dvec4(position);
gl_Position = vec4(posi);
}