09-18-2017 11:57 AM
// Setup the scene matrices.GL( glGenBuffers( 1, &scene->SceneMatrices ) );GL( glBindBuffer( GL_UNIFORM_BUFFER, scene->SceneMatrices ) );GL( glBufferData( GL_UNIFORM_BUFFER, 2 * sizeof( ovrMatrix4f ) /* 2 view matrices */ + 2 * sizeof( ovrMatrix4f ) /* 2 projection matrices */,NULL, GL_STATIC_DRAW ) );GL( glBindBuffer( GL_UNIFORM_BUFFER, 0 ) );
"uniform SceneMatrices\n" "{\n" " uniform mat4 ViewMatrix[NUM_VIEWS];\n" " uniform mat4 ProjectionMatrix;\n" "} sm;\n"
Why is this? Should I follow this model in my app? Will it effect the rendering?09-20-2017 02:53 PM