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/blender | |
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/blender')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 7 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 20 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 2 |
4 files changed, 27 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 82b934d52e6..a1d583624cd 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -10904,7 +10904,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) 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; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index d3eb4f12b2a..7a87ca8c680 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -583,8 +583,9 @@ typedef struct GameData { /* 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 @@ typedef struct GameData { #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 diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 84cf50a3755..e1bf4d73fff 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2036,6 +2036,14 @@ static void rna_def_scene_game_data(BlenderRNA *brna) 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 @@ static void rna_def_scene_game_data(BlenderRNA *brna) 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 @@ static void rna_def_scene_game_data(BlenderRNA *brna) 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"); diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 8abc12b8bec..e36d9c0b0ab 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -264,7 +264,7 @@ int WM_init_game(bContext *C) } /* Fullscreen */ - if(scene->gm.fullscreen) { + if((scene->gm.playerflag & GAME_PLAYER_FULLSCREEN)) { WM_operator_name_call(C, "WM_OT_window_fullscreen_toggle", WM_OP_EXEC_DEFAULT, NULL); wm_get_screensize(&ar->winrct.xmax, &ar->winrct.ymax); ar->winx = ar->winrct.xmax + 1; |