From 9d159548645df034be0f3bbb6504b83021fb2a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Thu, 13 Jun 2019 19:01:21 +0200 Subject: [PATCH] Add backface culing to modelviewer --- programs/modelViewer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/modelViewer.c b/programs/modelViewer.c index c91102a..ee19f4e 100644 --- a/programs/modelViewer.c +++ b/programs/modelViewer.c @@ -484,6 +484,8 @@ int main() noise = !noise; else if (event.key.keysym.scancode == SDL_SCANCODE_W) wire = !wire; + else if (event.key.keysym.scancode == SDL_SCANCODE_B) + model.config.backfaceCulling = (model.config.backfaceCulling + 1) % 3; else if (event.key.keysym.scancode == SDL_SCANCODE_SPACE) { modelIndex = (modelIndex + 1) % modelsTotal;