Adding benchmark
This commit is contained in:
@@ -18,3 +18,31 @@ void PlayView::commitUpdate() { GameView::commitUpdate(); }
|
||||
void PlayView::prepareRender() { GameView::prepareRender(); }
|
||||
|
||||
void PlayView::render() { GameView::render(); }
|
||||
|
||||
void PlayView::keyCallback(KeyCode code, InputAction action, KeyModifier modifier) {
|
||||
GameView::keyCallback(code, action, modifier);
|
||||
if (code == KeyCode::KEY_P && action == InputAction::RELEASE) {
|
||||
getGlobals().usePositionOnly = !getGlobals().usePositionOnly;
|
||||
std::cout << "Use Pos only " << getGlobals().usePositionOnly << std::endl;
|
||||
}
|
||||
if (code == KeyCode::KEY_O && action == InputAction::RELEASE) {
|
||||
getGlobals().useDepthCulling = !getGlobals().useDepthCulling;
|
||||
std::cout << "Use Depth Culling " << getGlobals().useDepthCulling << std::endl;
|
||||
}
|
||||
if (code == KeyCode::KEY_L && action == InputAction::RELEASE) {
|
||||
getGlobals().useLightCulling = !getGlobals().useLightCulling;
|
||||
std::cout << "Use Light Culling " << getGlobals().useLightCulling << std::endl;
|
||||
}
|
||||
if (code == KeyCode::KEY_G && action == InputAction::RELEASE) {
|
||||
Component::Camera cam;
|
||||
Component::Transform tra;
|
||||
scene->view<Component::Camera, Component::Transform>([&cam, &tra](Component::Camera& c, Component::Transform& t) {
|
||||
if (c.mainCamera) {
|
||||
tra = t;
|
||||
cam = c;
|
||||
}
|
||||
});
|
||||
std::cout << cam.getCameraPosition() << std::endl;
|
||||
std::cout << tra.getRotation() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user