mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 11:24:27 +01:00
Cache the VBO/index buffer to avoid redundancy.
Well, mostly just redundant unbinds.
This commit is contained in:
1 parent
50f5809c54
commit
40ea889b6a
4 files changed
+19
-19
No files matched your search
@@ -536,8 +536,8 @@ void FramebufferManager::DrawPlainColor(u32 color) {
|
||||
|
||||
glsl_bind(program);
|
||||
glUniform4fv(plainColorLoc_, 1, col);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
glstate.arrayBuffer.unbind();
|
||||
glstate.elementArrayBuffer.unbind();
|
||||
glEnableVertexAttribArray(program->a_position);
|
||||
glVertexAttribPointer(program->a_position, 3, GL_FLOAT, GL_FALSE, 12, pos);
|
||||
glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_BYTE, indices);
|
||||
@@ -608,8 +608,8 @@ void FramebufferManager::DrawActiveTexture(GLuint texture, float x, float y, flo
|
||||
float time[4] = {time_now(), (vCount % 60) * 1.0f/60.0f, (float)vCount, (float)(flipCount % 60)};
|
||||
glUniform4fv(timeLoc_, 1, time);
|
||||
}
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
glstate.arrayBuffer.unbind();
|
||||
glstate.elementArrayBuffer.unbind();
|
||||
glEnableVertexAttribArray(program->a_position);
|
||||
glEnableVertexAttribArray(program->a_texcoord0);
|
||||
glVertexAttribPointer(program->a_position, 3, GL_FLOAT, GL_FALSE, 12, pos);
|
||||
|
||||
Reference in new issue
Block a user