mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
GE Debugger: Fix tex preview race condition.
If we redraw the tex preview first, we need this for the VAO. Oops.
This commit is contained in:
parent
a8588b0c5c
commit
e90ffdb8e1
1 changed files with 9 additions and 3 deletions
|
@ -392,8 +392,10 @@ void CGEDebugger::UpdatePrimPreview(u32 op, int which) {
|
|||
glBindVertexArray(previewVao);
|
||||
glEnableVertexAttribArray(previewProgram->a_position);
|
||||
|
||||
glGenBuffers(1, &ibuf);
|
||||
glGenBuffers(1, &vbuf);
|
||||
if (ibuf == 0)
|
||||
glGenBuffers(1, &ibuf);
|
||||
if (vbuf == 0)
|
||||
glGenBuffers(1, &vbuf);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibuf);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vbuf);
|
||||
|
||||
|
@ -451,11 +453,15 @@ void CGEDebugger::UpdatePrimPreview(u32 op, int which) {
|
|||
glScissor((GLint)x, (GLint)-(y + fh - secondWindow->Height()), (GLsizei)fw, (GLsizei)fh);
|
||||
BindPreviewProgram(texPreviewProgram);
|
||||
|
||||
if (texPreviewVao == 0 && gl_extensions.ARB_vertex_array_object) {
|
||||
if (texPreviewVao == 0 && vbuf != 0 && ibuf != 0 && gl_extensions.ARB_vertex_array_object) {
|
||||
glGenVertexArrays(1, &texPreviewVao);
|
||||
glBindVertexArray(texPreviewVao);
|
||||
glEnableVertexAttribArray(texPreviewProgram->a_position);
|
||||
|
||||
if (ibuf == 0)
|
||||
glGenBuffers(1, &ibuf);
|
||||
if (vbuf == 0)
|
||||
glGenBuffers(1, &vbuf);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibuf);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vbuf);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue