Skip to content

Commit

Permalink
hard coded sphere
Browse files Browse the repository at this point in the history
  • Loading branch information
hannorein committed Jan 29, 2024
1 parent e418aa2 commit 139abd6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/closeencounter_hybrid/Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 1 addition & 2 deletions src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/rebound.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 139abd6

Please sign in to comment.