I'm using OpenGL with C++ through glew. Two simple questions:
1) What format does the matrix (as GLfloat) for the function glUniformMatrix__ has to have? I couldn't find any information in the doc nor google.
2) Is the following safe to do:
I ask, because I read somewhere, that OpenGL calls aren't necessarily issued instantly and the pointer might be invalid if the "upload into vram" happens to late.Code :GLfloat* vertexBuffer = new GLfloat[dynamicSize]; glBufferData(GL_ARRAY_BUFFER, dynamicSize * 4, vertexBuffer, GL_STATIC_DRAW); delete vertexBuffer;