Make this pretty
This commit is contained in:
parent
c678172f32
commit
2907ffd72c
|
@ -16,6 +16,8 @@
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
#include "ProgramShaderCache.h"
|
#include "ProgramShaderCache.h"
|
||||||
|
#include "MathUtil.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
namespace OGL
|
namespace OGL
|
||||||
{
|
{
|
||||||
|
@ -176,14 +178,14 @@ namespace OGL
|
||||||
// We multiply by *4*4 because we need to get down to basic machine units.
|
// 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
|
// So multiply by four to get how many floats we have from vec4s
|
||||||
// Then once more to get bytes
|
// 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
|
// Now bind the buffer to the index point
|
||||||
// We know PS is 0 since we have it statically set in the shader
|
// We know PS is 0 since we have it statically set in the shader
|
||||||
glBindBufferBase(GL_UNIFORM_BUFFER, 1, UBOBuffers[0]);
|
glBindBufferBase(GL_UNIFORM_BUFFER, 1, UBOBuffers[0]);
|
||||||
|
|
||||||
// Repeat for VS shader
|
// Repeat for VS shader
|
||||||
glBindBuffer(GL_UNIFORM_BUFFER, UBOBuffers[1]);
|
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]);
|
glBindBufferBase(GL_UNIFORM_BUFFER, 2, UBOBuffers[1]);
|
||||||
}
|
}
|
||||||
void ProgramShaderCache::Shutdown(void)
|
void ProgramShaderCache::Shutdown(void)
|
||||||
|
|
Loading…
Reference in New Issue