Catalyst 13.1 Legacy: possible ubo/struct bug

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.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.