diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2012-01-12 00:53:22 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2012-01-12 00:53:22 +0400 |
commit | de86d89a9fd07ecf9d2ab210bdebe7527a3cd817 (patch) | |
tree | 73ffd5e7fa3d5ffd66f2e34b59e3a68ab43c1f42 /source/gameengine/GamePlayer | |
parent | a2a8cc87985ebbae73e8ed94dcfc2b650c4e746d (diff) |
Cucumber - AA for blenderplayer and fullscreen
..............................................
svn merge ^/branches/soc-2011-cucumber -r 38968,38970,38973,39045,40845
Notes:
======
* we replaced fullscreen by playerflag in DNA_scene.types.h. So no doversion here, I think this is a small reversion can't see any potential problem in forcuing users to re-check fullscreen. If the file is really old (<250) it will doversion though;
* (for after commit) it would be nice to gray out the width/height when desktop=True
* for a rainy day: it would be nice to have other ghost modes (e.g. screensaver) to support desktop + MSAA as well. It's not a huge deal given that I don't even know if anything else work (apart from windowed, fullscreen and embed) but it doesn't hurt to have it updated as well.
* there is something strange with outliner. I think space_outliner merge-info is not in sync with the ^/ folder. It's probably a wrong merge early in cucumber.
Commit Logs:
===========
# 40845 by dfelinto
remove desktop and fullscreen properties. They are both part of playerflag now
also I removed the fullscreen from the DNA completely. I don't think we need doversion that..
#39045 by kupoman
The Desktop option is now greyed out when fullscreen is not checked rather than disappearing from the UI completely.
#38973 by kupoman
Adding a checkbox to the UI to allow the full screen Blender Player to use the current desktop resolution instead of the resolution setting.
#38970 by kupoman
Multisampling now works in a fullscreen Blender Player.
#38968 by moguri
Committing a patch from Mitchell Stokes (Moguri) to include a setting in the UI for the Blenderplayer multisampling.
Diffstat (limited to 'source/gameengine/GamePlayer')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 11 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.h | 2 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 16 |
3 files changed, 21 insertions, 8 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index f249510ecc7..f7c366599ef 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -372,17 +372,20 @@ bool GPG_Application::startFullScreen( int bpp,int frequency, const bool stereoVisual, const int stereoMode, - const GHOST_TUns16 samples) + const GHOST_TUns16 samples, + bool useDesktop) { bool success; + GHOST_TUns32 sysWidth=0, sysHeight=0; + fSystem->getMainDisplayDimensions(sysWidth, sysHeight); // Create the main window GHOST_DisplaySetting setting; - setting.xPixels = width; - setting.yPixels = height; + setting.xPixels = (useDesktop) ? sysWidth : width; + setting.yPixels = (useDesktop) ? sysHeight : height; setting.bpp = bpp; setting.frequency = frequency; - fSystem->beginFullScreen(setting, &m_mainWindow, stereoVisual); + fSystem->beginFullScreen(setting, &m_mainWindow, stereoVisual, samples); m_mainWindow->setCursorVisibility(false); m_mainWindow->setState(GHOST_kWindowStateFullScreen); diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.h b/source/gameengine/GamePlayer/ghost/GPG_Application.h index 37625dc8998..51dac5cb3f3 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.h +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.h @@ -64,7 +64,7 @@ public: bool SetGameEngineData(struct Main* maggie, struct Scene* scene, GlobalSettings* gs, int argc, char** argv); bool startWindow(STR_String& title, int windowLeft, int windowTop, int windowWidth, int windowHeight, const bool stereoVisual, const int stereoMode, const GHOST_TUns16 samples=0); - bool startFullScreen(int width, int height, int bpp, int frequency, const bool stereoVisual, const int stereoMode, const GHOST_TUns16 samples=0); + bool startFullScreen(int width, int height, int bpp, int frequency, const bool stereoVisual, const int stereoMode, const GHOST_TUns16 samples=0, bool useDesktop=false); bool startEmbeddedWindow(STR_String& title, const GHOST_TEmbedderWindowID parent_window, const bool stereoVisual, const int stereoMode, const GHOST_TUns16 samples=0); #ifdef WIN32 bool startScreenSaverFullScreen(int width, int height, int bpp, int frequency, const bool stereoVisual, const int stereoMode, const GHOST_TUns16 samples=0); diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index e84df921fd5..c725847037a 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -365,6 +365,7 @@ int main(int argc, char** argv) GHOST_TEmbedderWindowID parentWindow = 0; bool isBlenderPlayer = false; int validArguments=0; + bool samplesParFound = false; GHOST_TUns16 aasamples = 0; #ifdef __linux__ @@ -582,8 +583,14 @@ int main(int argc, char** argv) break; case 'm': i++; + samplesParFound = true; if ((i+1) <= validArguments ) - aasamples = atoi(argv[i++]); + aasamples = atoi(argv[i++]); + else + { + error = true; + printf("error: No argument supplied for -m"); + } break; case 'c': i++; @@ -819,7 +826,7 @@ int main(int argc, char** argv) if ((!fullScreenParFound) && (!windowParFound)) { // Only use file settings when command line did not override - if (scene->gm.fullscreen) { + if ((scene->gm.playerflag & GAME_PLAYER_FULLSCREEN)) { //printf("fullscreen option found in Blender file\n"); fullScreen = true; fullScreenWidth= scene->gm.xplay; @@ -848,6 +855,9 @@ int main(int argc, char** argv) else scene->gm.stereoflag = STEREO_ENABLED; + if (!samplesParFound) + aasamples = scene->gm.aasamples; + if (stereoFlag == STEREO_DOME){ stereomode = RAS_IRasterizer::RAS_STEREO_DOME; scene->gm.stereoflag = STEREO_DOME; @@ -893,7 +903,7 @@ int main(int argc, char** argv) #endif { app.startFullScreen(fullScreenWidth, fullScreenHeight, fullScreenBpp, fullScreenFrequency, - stereoWindow, stereomode, aasamples); + stereoWindow, stereomode, aasamples, (scene->gm.playerflag & GAME_PLAYER_DESKTOP_RESOLUTION)); } } else |