1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Fix rendering race in offscreen example

This commit is contained in:
Camilla Löwy 2020-02-05 02:01:47 +01:00
parent a0a5cc57df
commit 4b8ac11aa3

View File

@ -148,6 +148,7 @@ int main(void)
glUseProgram(program); glUseProgram(program);
glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) mvp); glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) mvp);
glDrawArrays(GL_TRIANGLES, 0, 3); glDrawArrays(GL_TRIANGLES, 0, 3);
glFinish();
#if USE_NATIVE_OSMESA #if USE_NATIVE_OSMESA
glfwGetOSMesaColorBuffer(window, &width, &height, NULL, (void**) &buffer); glfwGetOSMesaColorBuffer(window, &width, &height, NULL, (void**) &buffer);