@@ -166,7 +166,7 @@ int cncvis_init(const char *configFile)
166166 glInit (globalFramebuffer );
167167
168168 // Initialize the camera and Y axis as up
169- globalCamera = ucncCameraNew (500 .0f , 500 .0f , 500 .0f , 0.0f , 0.0f , 1.0f );
169+ globalCamera = ucncCameraNew (600 .0f , 600 .0f , 300 .0f , 0.0f , 0.0f , 1.0f );
170170
171171 printCameraDetails (globalCamera );
172172 printf ("Successfully initialised the global camera.\n" );
@@ -179,19 +179,10 @@ int cncvis_init(const char *configFile)
179179 // Enable depth testing and lighting for the scene
180180 glEnable (GL_DEPTH_TEST );
181181
182- // Set up lighting properties for GL_LIGHT0 to simulate distant sunlight
183- GLfloat light_position [] = {1000.0 , 1000.0 , 1000.0 , 0.0 }; // Directional light pointing from above and to the right
184- GLfloat light_ambient [] = {0.2 , 0.2 , 0.2 , 1.0 }; // Very soft ambient lighting
185- GLfloat light_diffuse [] = {1.0 , 1.0 , 1.0 , 1.0 }; // Full white diffuse lighting
186- GLfloat light_specular [] = {1.0 , 1.0 , 1.0 , 1.0 }; // Full white specular highlights
187- glLightfv (GL_LIGHT0 , GL_POSITION , light_position );
188- glLightfv (GL_LIGHT0 , GL_AMBIENT , light_ambient );
189- glLightfv (GL_LIGHT0 , GL_DIFFUSE , light_diffuse );
190- glLightfv (GL_LIGHT0 , GL_SPECULAR , light_specular );
191-
192182 // Enable lighting for the scene
193183 glEnable (GL_LIGHTING );
194184 glEnable (GL_LIGHT0 );
185+ glEnable (GL_LIGHT1 );
195186
196187 // Enable color material to apply colors from the actor to materials
197188 glEnable (GL_COLOR_MATERIAL );
@@ -207,7 +198,7 @@ int cncvis_init(const char *configFile)
207198 glLoadIdentity ();
208199 // Correct aspect ratio calculation for the framebuffer
209200 GLfloat aspectRatio = (GLfloat )globalFramebuffer -> xsize / (GLfloat )globalFramebuffer -> ysize ;
210- gluPerspective (90 .0f , aspectRatio , 1.0f , 5000.0f ); // FOV, aspect ratio, near, far planes
201+ gluPerspective (60 .0f , aspectRatio , 1.0f , 5000.0f ); // FOV, aspect ratio, near, far planes
211202
212203 // Switch to modelview matrix for placing objects in the 3D scene
213204 glMatrixMode (GL_MODELVIEW );
@@ -277,7 +268,7 @@ void cncvis_render(void)
277268 glLoadIdentity ();
278269
279270 GLfloat aspectRatio = (GLfloat )globalFramebuffer -> xsize / (GLfloat )globalFramebuffer -> ysize ;
280- gluPerspective (90 .0f , aspectRatio , 1.0f , 5000.0f );
271+ gluPerspective (60 .0f , aspectRatio , 1.0f , 5000.0f );
281272
282273 glMatrixMode (GL_MODELVIEW );
283274 glLoadIdentity ();
0 commit comments