add function to CommonRenderInterface to update/activate a texture

add example how to render a texture 2d quad in SimpleOpenGL3
This commit is contained in:
Erwin Coumans
2016-04-20 12:55:21 -07:00
parent da948a0729
commit 4e61f0cab9
5 changed files with 93 additions and 26 deletions

View File

@@ -44,17 +44,7 @@ void InternalOpenGL2RenderCallbacks::display2()
PrimInternalData* data = getData();
glUseProgram(data->m_shaderProg);
float identity[16]={1,0,0,0,
0,1,0,0,
0,0,1,0,
0,0,0,1};
glUniformMatrix4fv(data->m_viewmatUniform, 1, false, identity);
glUniformMatrix4fv(data->m_projMatUniform, 1, false, identity);
glBindBuffer(GL_ARRAY_BUFFER, s_vertexBuffer);
glBindVertexArray(s_vertexArrayObject);
assert(glGetError()==GL_NO_ERROR);