Skip to content

Commit b72948f

Browse files
committed
restore framebuffer setting
1 parent 79065c1 commit b72948f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Vector/vector_display.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,9 @@ void gen_linetex(vector_display_t *self) {
529529
}
530530

531531
int vector_display_setup(vector_display_t *self) {
532+
GLuint origdrawbuffer;
533+
glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint*)&origdrawbuffer);
534+
532535
const char *nocolor_vertex_shader_text =
533536
" uniform mat4 inProjectionMatrix; \n"
534537
" uniform mat4 inModelViewMatrix; \n"
@@ -794,6 +797,9 @@ int vector_display_setup(vector_display_t *self) {
794797
glBindBuffer(GL_ARRAY_BUFFER, self->glow2glow_vertexbuffer);
795798
glBufferData(GL_ARRAY_BUFFER, sizeof(glow2glow_points), glow2glow_points, GL_STATIC_DRAW);
796799

800+
// put back old framebuffer
801+
glBindFramebuffer(GL_FRAMEBUFFER, origdrawbuffer);
802+
797803
return 0;
798804
}
799805

0 commit comments

Comments
 (0)