1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/small3dlib.git synced 2024-11-21 20:39:57 +01:00

Add backface culing to modelviewer

This commit is contained in:
Miloslav Číž 2019-06-13 19:01:21 +02:00
parent b932a39e51
commit 9d15954864

View file

@ -484,6 +484,8 @@ int main()
noise = !noise; noise = !noise;
else if (event.key.keysym.scancode == SDL_SCANCODE_W) else if (event.key.keysym.scancode == SDL_SCANCODE_W)
wire = !wire; 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) else if (event.key.keysym.scancode == SDL_SCANCODE_SPACE)
{ {
modelIndex = (modelIndex + 1) % modelsTotal; modelIndex = (modelIndex + 1) % modelsTotal;