Skip to content

Commit

Permalink
Little Improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
skhayrulin committed Mar 26, 2015
1 parent 69f574f commit dea700d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/owWorldSimulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,14 @@ GLvoid resize(GLsizei width, GLsizei height){
glRotatef(camera_rot_lag[1], 0.0, 1.0, 0.0);
glGetFloatv(GL_MODELVIEW_MATRIX, modelView);
}
void init(void){
inline void init(void){
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_COLOR_MATERIAL);
glEnable(GL_NORMALIZE);
glEnable(GL_AUTO_NORMAL);
float ambient[4] = {1.0, 1.0, 1.0, 1};
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient);
glClearColor(0.7f, 0.7f, 0.7f, 1.0f);
glClearDepth(1.0f);

Expand Down Expand Up @@ -761,13 +768,6 @@ void run(int argc, char** argv, const bool with_graphics, const bool load_to)
glutInitWindowPosition(100, 100);
winIdMain = glutCreateWindow("Palyanov Andrey for OpenWorm: OpenCL PCISPH fluid + elastic matter + membranes [2013]: C.elegans body generator demo");
glutIdleFunc (idle);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_COLOR_MATERIAL);
glEnable(GL_NORMALIZE);
glEnable(GL_AUTO_NORMAL);
float ambient[4] = {1.0, 1.0, 1.0, 1};
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient);
//Init physic Simulation
init();
glutDisplayFunc(display);
Expand Down

0 comments on commit dea700d

Please sign in to comment.