[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43311] trunk/blender: Cucumber - AA for blenderplayer and fullscreen
Dalai Felinto
dfelinto at gmail.com
Wed Jan 11 21:53:32 CET 2012
Revision: 43311
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43311
Author: dfelinto
Date: 2012-01-11 20:53:22 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/intern/ghost/GHOST_ISystem.h
trunk/blender/intern/ghost/intern/GHOST_System.cpp
trunk/blender/intern/ghost/intern/GHOST_System.h
trunk/blender/release/scripts/startup/bl_ui/properties_game.py
trunk/blender/source/blender/blenloader/intern/readfile.c
trunk/blender/source/blender/makesdna/DNA_scene_types.h
trunk/blender/source/blender/makesrna/intern/rna_scene.c
trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.h
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
Property Changed:
----------------
trunk/blender/
trunk/blender/source/blender/editors/space_outliner/
Property changes on: trunk/blender
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
+ /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
Modified: trunk/blender/intern/ghost/GHOST_ISystem.h
===================================================================
--- trunk/blender/intern/ghost/GHOST_ISystem.h 2012-01-11 20:14:15 UTC (rev 43310)
+++ trunk/blender/intern/ghost/GHOST_ISystem.h 2012-01-11 20:53:22 UTC (rev 43311)
@@ -255,7 +255,7 @@
* @return Indication of success.
*/
virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window,
- const bool stereoVisual) = 0;
+ const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0) = 0;
/**
* Ends full screen mode.
Modified: trunk/blender/intern/ghost/intern/GHOST_System.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_System.cpp 2012-01-11 20:14:15 UTC (rev 43310)
+++ trunk/blender/intern/ghost/intern/GHOST_System.cpp 2012-01-11 20:53:22 UTC (rev 43311)
@@ -139,7 +139,7 @@
GHOST_TSuccess GHOST_System::beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window,
- const bool stereoVisual)
+ const bool stereoVisual, const GHOST_TUns16 numOfAASamples)
{
GHOST_TSuccess success = GHOST_kFailure;
GHOST_ASSERT(m_windowManager, "GHOST_System::beginFullScreen(): invalid window manager")
@@ -151,7 +151,7 @@
success = m_displayManager->setCurrentDisplaySetting(GHOST_DisplayManager::kMainDisplay, setting);
if (success == GHOST_kSuccess) {
//GHOST_PRINT("GHOST_System::beginFullScreen(): creating full-screen window\n");
- success = createFullScreenWindow((GHOST_Window**)window, stereoVisual);
+ success = createFullScreenWindow((GHOST_Window**)window, stereoVisual, numOfAASamples);
if (success == GHOST_kSuccess) {
m_windowManager->beginFullScreen(*window, stereoVisual);
}
@@ -333,7 +333,7 @@
}
-GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window** window, const bool stereoVisual)
+GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window** window, const bool stereoVisual, const GHOST_TUns16 numOfAASamples)
{
GHOST_TSuccess success;
GHOST_ASSERT(m_displayManager, "GHOST_System::createFullScreenWindow(): invalid display manager")
@@ -347,7 +347,8 @@
0, 0, settings.xPixels, settings.yPixels,
GHOST_kWindowStateFullScreen,
GHOST_kDrawingContextTypeOpenGL,
- stereoVisual);
+ stereoVisual,
+ numOfAASamples);
success = *window == 0 ? GHOST_kFailure : GHOST_kSuccess;
}
return success;
Modified: trunk/blender/intern/ghost/intern/GHOST_System.h
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_System.h 2012-01-11 20:14:15 UTC (rev 43310)
+++ trunk/blender/intern/ghost/intern/GHOST_System.h 2012-01-11 20:53:22 UTC (rev 43311)
@@ -144,7 +144,7 @@
* @return Indication of success.
*/
virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window,
- const bool stereoVisual);
+ const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0);
/**
* Ends full screen mode.
@@ -308,7 +308,7 @@
* @return Indication of success.
*/
virtual GHOST_TSuccess createFullScreenWindow(GHOST_Window** window,
- const bool stereoVisual);
+ const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0);
/** The display manager (platform dependant). */
GHOST_DisplayManager* m_displayManager;
Modified: trunk/blender/release/scripts/startup/bl_ui/properties_game.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_game.py 2012-01-11 20:14:15 UTC (rev 43310)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_game.py 2012-01-11 20:53:22 UTC (rev 43311)
@@ -274,16 +274,23 @@
row = layout.row()
row.operator("wm.blenderplayer_start", text="Start")
- row.prop(gs, "show_fullscreen")
+ row.label()
row = layout.row()
row.label(text="Resolution:")
row = layout.row(align=True)
row.prop(gs, "resolution_x", slider=False, text="X")
row.prop(gs, "resolution_y", slider=False, text="Y")
-
+ row = layout.row()
+ col = row.column()
+ col.prop(gs, "show_fullscreen")
+ col = row.column()
+ col.prop(gs, "use_desktop")
+ col.active = gs.show_fullscreen
+
col = layout.column()
col.label(text="Quality:")
+ col.prop(gs, "samples")
col = layout.column(align=True)
col.prop(gs, "depth", text="Bit Depth", slider=False)
col.prop(gs, "frequency", text="Refresh Rate", slider=False)
Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c 2012-01-11 20:14:15 UTC (rev 43310)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2012-01-11 20:53:22 UTC (rev 43311)
@@ -10904,7 +10904,7 @@
sce->gm.dome.warptext = sce->r.dometext;
//Stand Alone
- sce->gm.fullscreen = sce->r.fullscreen;
+ sce->gm.playerflag |= (sce->r.fullscreen?GAME_PLAYER_FULLSCREEN:0);
sce->gm.xplay = sce->r.xplay;
sce->gm.yplay = sce->r.yplay;
sce->gm.freqplay = sce->r.freqplay;
Property changes on: trunk/blender/source/blender/editors/space_outliner
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
+ /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
Modified: trunk/blender/source/blender/makesdna/DNA_scene_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_scene_types.h 2012-01-11 20:14:15 UTC (rev 43310)
+++ trunk/blender/source/blender/makesdna/DNA_scene_types.h 2012-01-11 20:53:22 UTC (rev 43311)
@@ -583,8 +583,9 @@
/* standalone player */
struct GameFraming framing;
- short fullscreen, xplay, yplay, freqplay;
+ short playerflag, xplay, yplay, freqplay;
short depth, attrib, rt1, rt2;
+ short aasamples, pad4[3];
/* stereo/dome mode */
struct GameDome dome;
@@ -661,6 +662,10 @@
#define GAME_SHOW_OBSTACLE_SIMULATION (1 << 16)
/* Note: GameData.flag is now an int (max 32 flags). A short could only take 16 flags */
+/* GameData.playerflag */
+#define GAME_PLAYER_FULLSCREEN (1 << 0)
+#define GAME_PLAYER_DESKTOP_RESOLUTION (1 << 1)
+
/* GameData.matmode */
#define GAME_MAT_TEXFACE 0
#define GAME_MAT_MULTITEX 1
Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c 2012-01-11 20:14:15 UTC (rev 43310)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c 2012-01-11 20:53:22 UTC (rev 43311)
@@ -2036,6 +2036,14 @@
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem aasamples_items[] ={
+ {0, "SAMPLES_0", 0, "Off", ""},
+ {2, "SAMPLES_2", 0, "2x", ""},
+ {4, "SAMPLES_4", 0, "4x", ""},
+ {8, "SAMPLES_8", 0, "8x", ""},
+ {16, "SAMPLES_16", 0, "16x", ""},
+ {0, NULL, 0, NULL, NULL}};
+
static EnumPropertyItem framing_types_items[] ={
{SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox",
"Show the entire viewport in the display window, using bar horizontally or vertically"},
@@ -2105,6 +2113,11 @@
RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the screen");
RNA_def_property_update(prop, NC_SCENE, NULL);
+ prop= RNA_def_property(srna, "samples", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "aasamples");
+ RNA_def_property_enum_items(prop, aasamples_items);
+ RNA_def_property_ui_text(prop, "AA Samples", "The number of AA Samples to use for MSAA");
+
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "depth");
RNA_def_property_range(prop, 8, 32);
@@ -2126,10 +2139,15 @@
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "show_fullscreen", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "fullscreen", 1.0);
+ RNA_def_property_boolean_sdna(prop, NULL, "playerflag", GAME_PLAYER_FULLSCREEN);
RNA_def_property_ui_text(prop, "Fullscreen", "Start player in a new fullscreen display");
RNA_def_property_update(prop, NC_SCENE, NULL);
+ prop= RNA_def_property(srna, "use_desktop", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "playerflag", GAME_PLAYER_DESKTOP_RESOLUTION);
+ RNA_def_property_ui_text(prop, "Desktop", "Uses the current desktop resultion in fullscreen mode");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
/* Framing */
prop= RNA_def_property(srna, "frame_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "framing.type");
Modified: trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c 2012-01-11 20:14:15 UTC (rev 43310)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list