Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Skapa någon stans i main
- Frustum frustum(FIELDOFVIEW, WIDTH / HEIGHT, NEARPLANE, FARPLANE);
- //Där man fixar med allt och kameran
- if (glfwGetKey(window, GLFW_KEY_LEFT_ALT) == GLFW_RELEASE)
- {
- camera.updateAll(window, WIDTH, HEIGHT, ImGui::GetIO().DeltaTime);
- frustum.setCamDef(camera.getCameraPosition(), camera.getCameraDirection(), camera.getCameraUp(), camera.getCameraRight());
- };
- //Där den kallar på att rendrera objektet
- if (frustum.sphereInFrustum(tri.vertices->position, 1.0f) == true)
- {
- renderer.Draw(va, ib, shader);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement