merge develop with my branch

This commit is contained in:
Modnark
2022-10-07 17:19:23 -04:00
parent 52c2f114a5
commit e2d75ae4d4

View File

@@ -74,6 +74,7 @@ Application::Application(HWND parentWindow) : _propWindow(NULL) { //: GApp(setti
CreateDirectory(tempPath.c_str(), NULL); CreateDirectory(tempPath.c_str(), NULL);
_hWndMain = parentWindow; _hWndMain = parentWindow;
_hideSky = false;
HMODULE hThisInstance = GetModuleHandle(NULL); HMODULE hThisInstance = GetModuleHandle(NULL);
@@ -548,12 +549,16 @@ void Application::onGraphics(RenderDevice* rd) {
lighting.ambient = Color3(0.6F,0.6F,0.6F); lighting.ambient = Color3(0.6F,0.6F,0.6F);
renderDevice->setProjectionAndCameraMatrix(*cameraController.getCamera()); renderDevice->setProjectionAndCameraMatrix(*cameraController.getCamera());
// Cyan background // TODO: stick this into its own rendering thing
//renderDevice->setColorClearValue(Color3(0.0f, 0.5f, 1.0f)); if(!_hideSky) {
renderDevice->clear(sky.isNull(), true, true); renderDevice->clear(sky.isNull(), true, true);
if (sky.notNull()) { if (sky.notNull()) sky->render(renderDevice, lighting);
sky->render(renderDevice, lighting); } else {
printf("ThumbnailGenerator::click\n");
rd->setColorClearValue(Color4(0.0f, 0.0f, 0.0f, 0.0f));
renderDevice->clear(true, true, true);
toggleSky();
} }
// Setup lighting // Setup lighting
@@ -863,6 +868,16 @@ void Application::resizeWithParent(HWND parentWindow)
} }
G3D::SkyRef Application::getSky()
{
return sky;
}
void Application::toggleSky()
{
_hideSky = !_hideSky;
}
void Application::QuitApp() void Application::QuitApp()
{ {
PostQuitMessage(0); PostQuitMessage(0);