Implemented basic occlusions queries

This commit is contained in:
Dynamitos
2024-06-11 16:55:20 +02:00
parent 52c4f11d28
commit df7fbef8bd
20 changed files with 221 additions and 156 deletions
+3 -7
View File
@@ -18,9 +18,8 @@
using namespace Seele;
bool usePositionOnly = false;
bool useViewCulling = false;
bool useDepthCulling = false;
bool useLightCulling = false;
bool resetVisibility = false;
GameView::GameView(Gfx::PGraphics graphics, PWindow window, const ViewportCreateInfo& createInfo, std::string dllPath)
: View(graphics, window, createInfo, "Game"), scene(new Scene(graphics)), gameInterface(dllPath) {
@@ -92,16 +91,13 @@ void GameView::keyCallback(KeyCode code, InputAction action, KeyModifier modifie
std::cout << "Use Pos only " << usePositionOnly << std::endl;
}
if (code == KeyCode::KEY_O && action == InputAction::RELEASE) {
useViewCulling = !useViewCulling;
std::cout << "Use View Culling " << useViewCulling << std::endl;
useDepthCulling = !useDepthCulling;
std::cout << "Use Depth Culling " << useDepthCulling << std::endl;
}
if (code == KeyCode::KEY_L && action == InputAction::RELEASE) {
useLightCulling = !useLightCulling;
std::cout << "Use Light Culling " << useLightCulling << std::endl;
}
if (code == KeyCode::KEY_R && action == InputAction::RELEASE) {
resetVisibility = true;
}
}
void GameView::mouseMoveCallback(double xPos, double yPos) { keyboardSystem->mouseCallback(xPos, yPos); }