[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/games/astrododge/src
From:       Rivo Laks <rivolaks () hot ! ee>
Date:       2009-08-07 18:03:59
Message-ID: 1249668239.773031.29147.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1008529 by rivol:

- Use better default exposure range and target.
- Show whether HDR rendering is active and current exposure in render info.

 M  +3 -0      displaywidget.cpp  
 M  +7 -0      gameguiview.cpp  


--- trunk/playground/games/astrododge/src/displaywidget.cpp #1008528:1008529
@@ -40,6 +40,9 @@
     mActiveWidget = 0;
 
     mMainMenu = 0;
+
+    setAutoExposureRange(0.4, 2.5);
+    setAutoExposureTarget(0.15);
 }
 
 DisplayWidget::~DisplayWidget()
--- trunk/playground/games/astrododge/src/gameguiview.cpp #1008528:1008529
@@ -20,6 +20,7 @@
 #include "gameworld.h"
 #include "ship.h"
 #include "renderinfo.h"
+#include "displaywidget.h"
 
 #include <kgllib/glwidget.h>
 #include <kgllib/textrenderer.h>
@@ -275,6 +276,12 @@
         statistics += QString("State changes:\n");
         statistics += QString("buf: %1  mat: %2  tex: %3\n")
                 .arg(renderInfo->bufferChanges()).arg(renderInfo->materialChanges()).arg(renderInfo->textureChanges());
 +        DisplayWidget* w = static_cast<DisplayWidget*>(glWidget());
+        statistics += QString("HDR: %1\n").arg(w->hdrRenderingActive());
+        if (w->hdrRenderingActive()) {
+            statistics += QString("Exposure: %1\n").arg(w->exposure(), 0, 'f', 2);
+        }
+
         glColor3f(0.8, 0.8, 0.8);
         QRect statsRect(10, 30, 300, 100);
         textRenderer()->draw(statsRect, statistics, Qt::AlignTop | Qt::AlignLeft, \
QFont("Arial", 10));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic