Merging r58701 through r58746 from trunk into soc-2013-depsgraph_mt
[blender.git] / source / blender / makesrna / intern / rna_scene.c
index 79085538a3c31aea7e9bcf07a5652275ddf404c3..34c4fbfc6093a7afbe74403a248a6a23c1d4f820 100644 (file)
@@ -3126,6 +3126,13 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
                {0, NULL, 0, NULL, NULL}
        };
 
                {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)"},
        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 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
        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);
        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");
        
        prop = RNA_def_property(srna, "samples", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "aasamples");