Login  Register

Re: Good news

Posted by adi on Sep 06, 2014; 12:31pm
URL: https://forum.jogamp.org/Good-news-tp4033046p4033071.html

Hi

Your are right, complexer datas are not read correct in.
I habe send this with  

gl.glBindBufferRange(GL4.GL_UNIFORM_BUFFER, 2, uboBuffer[2], 0, size);
gl.glBufferData(GL4.GL_UNIFORM_BUFFER, size, storage, GL4.GL_STATIC_DRAW);

The datas in the ByteBuffer storage are correct, i have testet it before.

In that uniform block

layout (shared,binding=2) uniform LightDatas {
vec4 lightPosition;
vec4 specular;
vec4 lightColor;
float ambientCoefficient;
float constantAttenuation;
float linearAttenuation;
float quadraticAttenuation;
float spotCutoff;
float spotCosCutoff;
float shininess;
vec3 spotDirection;
}

all datas are set to 0.0
Only simple datas with one element works .

Can it be, that the method glBufferData can not handle the data type ByteBuffer correct?
ByteBuffer holds different java data types.