diff --git a/examples/closeencounter_hybrid/Makefile b/examples/closeencounter_hybrid/Makefile index cd123bddbc..2a936bfa57 100644 --- a/examples/closeencounter_hybrid/Makefile +++ b/examples/closeencounter_hybrid/Makefile @@ -1,4 +1,4 @@ -export OPENGL=0# Set this to 1 to enable OpenGL +export OPENGL=1# Set this to 1 to enable OpenGL export SERVER=1# Set this to 1 to enable the visualization web server include ../../src/Makefile.defs diff --git a/src/display.c b/src/display.c index dd9a441763..3e78bdf866 100644 --- a/src/display.c +++ b/src/display.c @@ -666,7 +666,7 @@ void reb_render_frame(void* p){ glUseProgram(data->sphere_shader_program); glBindVertexArray(data->sphere_shader_particle_vao); glUniformMatrix4fv(data->sphere_shader_mvp_location, 1, GL_TRUE, (GLfloat*) tmp2); - reb_glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, data->sphere_shader_vertex_count, N_real); + reb_glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 800, N_real); glBindVertexArray(0); glDisable(GL_DEPTH_TEST); } @@ -1343,7 +1343,6 @@ void reb_display_init(struct reb_simulation * const r){ count++; } } - data->sphere_shader_vertex_count = count; GLuint sphere_vertex_buffer; glGenBuffers(1, &sphere_vertex_buffer); glBindBuffer(GL_ARRAY_BUFFER, sphere_vertex_buffer); diff --git a/src/rebound.h b/src/rebound.h index 6214b0c4a2..bbb5f7f5a9 100644 --- a/src/rebound.h +++ b/src/rebound.h @@ -1150,7 +1150,6 @@ struct reb_display_data { unsigned int sphere_shader_mvp_location; unsigned int sphere_shader_program; unsigned int sphere_shader_particle_vao; - unsigned int sphere_shader_vertex_count; unsigned int orbit_shader_mvp_location; unsigned int orbit_shader_program; unsigned int orbit_shader_particle_vao;