Mercurial > hg > forks > gldragon
changeset 31:6847715b46cd
Move piece of code a bit as a cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 22 Nov 2019 19:53:55 +0200 |
parents | 1a0e823283e4 |
children | 1215fdd0a8ab |
files | gldragon.cpp |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/gldragon.cpp Fri Nov 22 09:49:06 2019 +0200 +++ b/gldragon.cpp Fri Nov 22 19:53:55 2019 +0200 @@ -421,6 +421,13 @@ goto exit; } + // Define a default light if none defined in scene file + if (scene.lights.size() == 0) + { + DMLight light; // Default light + scene.lights.push_back(light); + } + printf("INFO: Loading %ld model(s) ..\n", scene.models.size()); @@ -444,13 +451,6 @@ } } - // Define a default light if none defined in scene file - if (scene.lights.size() == 0) - { - DMLight light; // Default light - scene.lights.push_back(light); - } - // Initialize SDL + OpenGL if (!dmInitSDLGL(optWidth, optHeight, "GLDragon")) goto exit;