Lighting
This commit is contained in:
@@ -43,6 +43,9 @@ void Engine::initGL()
|
||||
glDepthMask(GL_TRUE);
|
||||
glClearDepth(1.0f);
|
||||
glEnable(GL_CULL_FACE);
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_LIGHT0);
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
|
||||
//glDepthRange(-0.5f,0.5f);
|
||||
}
|
||||
|
@@ -74,7 +74,7 @@ void Render::render_loop() {
|
||||
auto stop = std::chrono::high_resolution_clock::now();
|
||||
float dT = (std::chrono::duration_cast<std::chrono::microseconds>(stop - start).count());
|
||||
|
||||
|
||||
/*
|
||||
//If we have more than 1000 fps.
|
||||
if (dT < 1000 && engine->window->getFlag(RWindowFlags::IN_FOCUS)) {
|
||||
int remaining = 1000 - dT;
|
||||
@@ -87,6 +87,7 @@ void Render::render_loop() {
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(remaining));
|
||||
dT += remaining;
|
||||
}
|
||||
*/
|
||||
engine->frameDelta = (dT / 1000000);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user