Hi,

I have the following code snippet :
        void    set()
        {
                GLfloat[]       data = [
                        -1.0f, -1.0f, 0.0f,
                        1.0f, -1.0f, 0.0f,
                        0.0f,  1.0f, 0.0f,
                ];

                glBindVertexArray(mVAO);
glBufferData(GL_ARRAY_BUFFER, data.sizeof, cast(void*)data, GL_STATIC_DRAW);
        }


And I ask my self about the memory management of data, as my data array is statically initialized is it allocated on stack?

On another side I have a strange behavior with the sizeof that returns 8 and not 36 (9 * 4) as I am expecting.

Reply via email to