[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58730] trunk/blender/source/blender: Missed a couple of files for the vsync commit (r58729).
Mitchell Stokes
mogurijin at gmail.com
Tue Jul 30 00:36:51 CEST 2013
Revision: 58730
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58730
Author: moguri
Date: 2013-07-29 22:36:51 +0000 (Mon, 29 Jul 2013)
Log Message:
-----------
Missed a couple of files for the vsync commit (r58729).
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58729
Modified Paths:
--------------
trunk/blender/source/blender/makesdna/DNA_scene_types.h
trunk/blender/source/blender/makesrna/intern/rna_scene.c
Modified: trunk/blender/source/blender/makesdna/DNA_scene_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_scene_types.h 2013-07-29 22:31:32 UTC (rev 58729)
+++ trunk/blender/source/blender/makesdna/DNA_scene_types.h 2013-07-29 22:36:51 UTC (rev 58730)
@@ -652,7 +652,8 @@
short mode, matmode;
short occlusionRes; /* resolution of occlusion Z buffer in pixel */
short physicsEngine;
- short exitkey, pad;
+ short exitkey;
+ short vsync; /* Controls vsync: off, on, or adaptive (if supported) */
short ticrate, maxlogicstep, physubstep, maxphystep;
short obstacleSimulation;
short raster_storage;
@@ -688,6 +689,11 @@
#define RAS_STORE_VA 2
#define RAS_STORE_VBO 3
+/* vsync */
+#define VSYNC_OFF 0
+#define VSYNC_ON 1
+#define VSYNC_ADAPTIVE 2
+
/* GameData.flag */
#define GAME_RESTRICT_ANIM_UPDATES (1 << 0)
#define GAME_ENABLE_ALL_FRAMES (1 << 1)
Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c 2013-07-29 22:31:32 UTC (rev 58729)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c 2013-07-29 22:36:51 UTC (rev 58730)
@@ -3126,6 +3126,13 @@
{0, NULL, 0, NULL, NULL}
};
+ static EnumPropertyItem vsync_items[] = {
+ {VSYNC_OFF, "OFF", 0, "Off", "Disables vsync"},
+ {VSYNC_ON, "ON", 0, "On", "Enables vsync"},
+ {VSYNC_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", "Enables adaptive vsync (if supported)"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
static EnumPropertyItem storage_items[] = {
{RAS_STORE_AUTO, "AUTO", 0, "Auto Select", "Chooses the best supported mode"},
{RAS_STORE_IMMEDIATE, "IMMEDIATE", 0, "Immediate Mode", "Slowest performance, requires OpenGL (any version)"},
@@ -3152,6 +3159,11 @@
RNA_def_property_range(prop, 4, 10000);
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, "vsync", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "vsync");
+ RNA_def_property_enum_items(prop, vsync_items);
+ RNA_def_property_ui_text(prop, "Vsync", "Change vsync settings");
prop = RNA_def_property(srna, "samples", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "aasamples");
More information about the Bf-blender-cvs
mailing list