mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
OGL: Attempt a larger buffer to workaround 7946.
This commit is contained in:
parent
5aa1d4733d
commit
5b51f5a801
@ -124,13 +124,14 @@ void OpenGL_CreateAttributelessVAO()
|
|||||||
glGenBuffers(1, &attributelessVBO);
|
glGenBuffers(1, &attributelessVBO);
|
||||||
_dbg_assert_msg_(VIDEO, attributelessVBO != 0, "Attributeless VBO should have been created successfully.")
|
_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);
|
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.
|
// We must also define vertex attribute 0.
|
||||||
glBindVertexArray(attributelessVAO);
|
glBindVertexArray(attributelessVAO);
|
||||||
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, nullptr);
|
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, nullptr);
|
||||||
|
glEnableVertexAttribArray(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenGL_BindAttributelessVAO()
|
void OpenGL_BindAttributelessVAO()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user