Make this pretty

This commit is contained in:
Ryan Houdek 2011-12-10 15:58:44 -06:00
parent c678172f32
commit 2907ffd72c
1 changed files with 4 additions and 2 deletions

View File

@ -16,6 +16,8 @@
// http://code.google.com/p/dolphin-emu/
#include "ProgramShaderCache.h"
#include "MathUtil.h"
#include <assert.h>
namespace OGL
{
@ -176,14 +178,14 @@ namespace OGL
// We multiply by *4*4 because we need to get down to basic machine units.
// So multiply by four to get how many floats we have from vec4s
// Then once more to get bytes
glBufferData(GL_UNIFORM_BUFFER, (C_PENVCONST_END * 4 * 4) - (C_PENVCONST_END * 4 * 4 % Align) + Align, NULL, GL_DYNAMIC_DRAW);
glBufferData(GL_UNIFORM_BUFFER, ROUND_UP(C_PENVCONST_END * 4 * 4, Align), NULL, GL_DYNAMIC_DRAW);
// Now bind the buffer to the index point
// We know PS is 0 since we have it statically set in the shader
glBindBufferBase(GL_UNIFORM_BUFFER, 1, UBOBuffers[0]);
// Repeat for VS shader
glBindBuffer(GL_UNIFORM_BUFFER, UBOBuffers[1]);
glBufferData(GL_UNIFORM_BUFFER, (C_VENVCONST_END * 4 * 4) - (C_VENVCONST_END * 4 * 4 % Align) + Align, NULL, GL_DYNAMIC_DRAW);
glBufferData(GL_UNIFORM_BUFFER, ROUND_UP(C_VENVCONST_END * 4 * 4, Align), NULL, GL_DYNAMIC_DRAW);
glBindBufferBase(GL_UNIFORM_BUFFER, 2, UBOBuffers[1]);
}
void ProgramShaderCache::Shutdown(void)