summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/GLUtil.cpp
diff options
context:
space:
mode:
authorUnknown W. Brackets <checkins@unknownbrackets.org>2014-12-16 22:20:45 -0800
committerUnknown W. Brackets <checkins@unknownbrackets.org>2014-12-16 22:20:45 -0800
commit5b51f5a801e9e387751d67eb25c32eff1a4aaf57 (patch)
treee791f15c6c37d5d23a5e981674bbcd4394e7052e /Source/Core/VideoBackends/OGL/GLUtil.cpp
parent5aa1d4733d30c2779bd857940699c01d079fe80f (diff)
OGL: Attempt a larger buffer to workaround 7946.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/GLUtil.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/GLUtil.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/OGL/GLUtil.cpp b/Source/Core/VideoBackends/OGL/GLUtil.cpp
index 8809d6be39..9cb4bb7bdd 100644
--- a/Source/Core/VideoBackends/OGL/GLUtil.cpp
+++ b/Source/Core/VideoBackends/OGL/GLUtil.cpp
@@ -124,13 +124,14 @@ void OpenGL_CreateAttributelessVAO()
glGenBuffers(1, &attributelessVBO);
_dbg_assert_msg_(VIDEO, attributelessVBO != 0, "Attributeless VBO should have been created successfully.")
- // Initialize the buffer with nothing.
+ // Initialize the buffer with nothing. 16 floats is an arbitrary size that may work around driver issues.
glBindBuffer(GL_ARRAY_BUFFER, attributelessVBO);
- glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat), nullptr, GL_STATIC_DRAW);
+ glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 16, nullptr, GL_STATIC_DRAW);
// We must also define vertex attribute 0.
glBindVertexArray(attributelessVAO);
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, nullptr);
+ glEnableVertexAttribArray(0);
}
void OpenGL_BindAttributelessVAO()