Added missing input.close()

This commit is contained in:
4VRDriver
2020-09-14 22:20:10 +02:00
parent b957e4a5ee
commit 88bfbc46be
5 changed files with 13 additions and 9 deletions

View File

@@ -5,6 +5,6 @@ Collapsed=0
[Window][Object Modifier]
Pos=60,60
Size=957,134
Size=925,127
Collapsed=0

View File

@@ -17,6 +17,7 @@ add_executable(Fall-Fever
target_link_libraries(
Fall-Fever PRIVATE
glad
glm
stb
${GLFW3_LIBRARY}
${OPENGL_LIBRARIES}

View File

@@ -79,23 +79,23 @@ void Controller::run() {
ShaderProgram lightProgram("res/shaders/light.vert", "res/shaders/light.frag");
//Model model_backpack("res/models/backpack.ffo");
Model model_plant("res/models/plant.ffo");
//Model model_plant("res/models/plant.ffo");
Model model_container("res/models/container.ffo");
Model model_cube("res/models/cube.ffo");
//Model model_dragon("res/models/dragon.ffo");
Model model_dragon("res/models/dragon.ffo");
//Model model_sphere("res/models/sphere.ffo");
//Entity backpack(&model_backpack, &shaderProgram);
//Entity sphere(&model_sphere, &shaderProgram);
Entity container(&model_container, &shaderProgram);
//Entity dragon(&model_dragon, &shaderProgram);
Entity plant(&model_plant, &shaderProgram);
Entity dragon(&model_dragon, &shaderProgram);
//Entity plant(&model_plant, &shaderProgram);
Entity lightSource(&model_cube, &lightProgram);
lightSource.translate(glm::vec3(-5.0f, 1.0f, 0.0f));
lightSource.setScale(0.2f);
plant.setScale(5.0f);
//dragon.setScale(0.2f);
//plant.setScale(5.0f);
dragon.setScale(0.2f);
glm::vec3 lightColor = glm::vec3(1.0f, 1.0f, 1.0f);
glm::vec3 diffuseColor = lightColor * glm::vec3(1.0f);
@@ -113,7 +113,7 @@ void Controller::run() {
shaderProgram.unbind();
World world(&shaderProgram);
world.addEntity(plant);
world.addEntity(dragon);
world.addEntity(lightSource);
world.updateLight(0, lightSource.getPosition(), glm::vec3(1.0f));

View File

@@ -7,7 +7,7 @@ double EventHandler::cameraMouseActionRegister[CAMERA_MOUSE_ACTION_NUM_ITEMS] =
bool EventHandler::windowActionRegister[WINDOW_ACTION_NUM_ITEMS] = {0};
bool EventHandler::firstMouseInput = 1;
float EventHandler::mouseSensitivity = 0.08f;
float EventHandler::mouseSensitivity = 0.5f;
EventHandler::EventHandler(GLFWwindow *window)

View File

@@ -101,4 +101,7 @@ void Model::loadModel(std::string pathToModel) {
Mesh currentMesh(meshVertices, meshIndices, meshTextures);
meshes.push_back(currentMesh);
}
input.close();
}