PDA

View Full Version : Catalyst 13.1 Legacy: possible ubo/struct bug



yousry
05-09-2013, 10:47 AM
Could not post this bug on devgurus so I try it here:


Create a struct:
struct Something {
...
float a;
float b;
float c;
};


Create an uniform block:


uniform wonderful {
mat4 has;
mat4 heppend;
Something dontPanik;
};

try to query the offsets with:


glGetActiveUniformsiv(programId, uboSIze, uNames, GL_UNIFORM_OFFSET, ubOffsets);


All floats are assigned to the same offset.

If the struct is alterated:


Create an struct:
struct SomethingElse {
...
float a;
vec3 cute;
float b;
vec3 little;
float c;
vec3 problems;

};



The floats are accessible.