clang compile fixes

This commit is contained in:
baldurk
2014-08-25 17:16:07 +01:00
parent ce2cf6c87f
commit 0532e4e8d6
3 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -150,7 +150,7 @@ void GLReplay::InitDebugData()
for(size_t i=0; i < ARRAY_COUNT(DebugData.UBOs); i++)
{
gl.glBindBuffer(eGL_UNIFORM_BUFFER, DebugData.UBOs[i]);
gl.glBufferData(eGL_UNIFORM_BUFFER, DebugData.UBOSize, NULL, eGL_DYNAMIC_DRAW);
gl.glBufferData(eGL_UNIFORM_BUFFER, Debug_UBOSize, NULL, eGL_DYNAMIC_DRAW);
}
DebugData.overlayTexWidth = DebugData.overlayTexHeight = 0;
@@ -262,7 +262,7 @@ bool GLReplay::RenderTexture(TextureDisplay cfg)
uboData *ubo = (uboData *)gl.glMapBufferRange(eGL_UNIFORM_BUFFER, 0, sizeof(uboData), GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
RDCCOMPILE_ASSERT(sizeof(uboData) <= DebugData.UBOSize, "UBO data is too big");
RDCCOMPILE_ASSERT(sizeof(uboData) <= Debug_UBOSize, "UBO data is too big");
float x = cfg.offx;
float y = cfg.offy;
+2 -1
View File
@@ -204,10 +204,11 @@ class GLReplay : public IReplayDriver
GLint overlayTexWidth, overlayTexHeight;
GLuint UBOs[2];
static const size_t UBOSize = 64 * sizeof(Vec4f);
GLuint emptyVAO;
} DebugData;
static const size_t Debug_UBOSize = 64 * sizeof(Vec4f);
void InitDebugData();
+2 -2
View File
@@ -242,8 +242,8 @@ Matrix4f Matrix4f::Orthographic(const float near, const float far)
float T = 10.0f;
float B = -10.0f;
float N = -abs(far-near)*0.5f;
float F = abs(far-near)*0.5f;
float N = -fabs(far-near)*0.5f;
float F = fabs(far-near)*0.5f;
if(far < near)
{