[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36958] branches/soc-2011-onion: GSOC 2011 - onion branch
Ryakiotakis Antonis
kalast at gmail.com
Fri May 27 23:46:10 CEST 2011
Revision: 36958
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36958
Author: psy-fi
Date: 2011-05-27 21:46:10 +0000 (Fri, 27 May 2011)
Log Message:
-----------
GSOC 2011 - onion branch
--High resolution Textures--
Added user preferences option under System->OpenGL to control behavior
Modified Paths:
--------------
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_userpref.py
branches/soc-2011-onion/source/blender/editors/interface/resources.c
branches/soc-2011-onion/source/blender/gpu/intern/gpu_draw.c
branches/soc-2011-onion/source/blender/makesdna/DNA_userdef_types.h
branches/soc-2011-onion/source/blender/makesrna/intern/rna_userdef.c
Modified: branches/soc-2011-onion/release/scripts/startup/bl_ui/space_userpref.py
===================================================================
--- branches/soc-2011-onion/release/scripts/startup/bl_ui/space_userpref.py 2011-05-27 21:13:44 UTC (rev 36957)
+++ branches/soc-2011-onion/release/scripts/startup/bl_ui/space_userpref.py 2011-05-27 21:46:10 UTC (rev 36958)
@@ -438,6 +438,7 @@
col.label(text="OpenGL:")
col.prop(system, "gl_clip_alpha", slider=True)
col.prop(system, "use_mipmaps")
+ col.prop(system, "use_highres_tex")
col.prop(system, "use_vertex_buffer_objects")
#Anti-aliasing is disabled as it breaks broder/lasso select
#col.prop(system, "use_antialiasing")
Modified: branches/soc-2011-onion/source/blender/editors/interface/resources.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/interface/resources.c 2011-05-27 21:13:44 UTC (rev 36957)
+++ branches/soc-2011-onion/source/blender/editors/interface/resources.c 2011-05-27 21:46:10 UTC (rev 36958)
@@ -1552,6 +1552,9 @@
U.autokey_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET;
}
+ if (bmain->versionfile < 258)
+ U.hirestex = 0;
+
/* GL Texture Garbage Collection (variable abused above!) */
if (U.textimeout == 0) {
U.texcollectrate = 60;
Modified: branches/soc-2011-onion/source/blender/gpu/intern/gpu_draw.c
===================================================================
--- branches/soc-2011-onion/source/blender/gpu/intern/gpu_draw.c 2011-05-27 21:13:44 UTC (rev 36957)
+++ branches/soc-2011-onion/source/blender/gpu/intern/gpu_draw.c 2011-05-27 21:46:10 UTC (rev 36958)
@@ -464,7 +464,7 @@
if (ibuf->rect_float){
/*replace with user preference when ready :)*/
- if(1)
+ if(U.hirestex)
{
/*Use high precision textures. This is relatively harmless because OpenGL gives us
a high precision format only if it is available*/
Modified: branches/soc-2011-onion/source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- branches/soc-2011-onion/source/blender/makesdna/DNA_userdef_types.h 2011-05-27 21:13:44 UTC (rev 36957)
+++ branches/soc-2011-onion/source/blender/makesdna/DNA_userdef_types.h 2011-05-27 21:46:10 UTC (rev 36958)
@@ -374,7 +374,7 @@
short scrcastfps; /* frame rate for screencast to be played back */
short scrcastwait; /* milliseconds between screencast snapshots */
- short pad8, pad[3]; /* Value for Dual/Single Column UI */
+ short hirestex, pad[3]; /* Value for Dual/Single Column UI */
char versemaster[160];
char verseuser[160];
Modified: branches/soc-2011-onion/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- branches/soc-2011-onion/source/blender/makesrna/intern/rna_userdef.c 2011-05-27 21:13:44 UTC (rev 36957)
+++ branches/soc-2011-onion/source/blender/makesrna/intern/rna_userdef.c 2011-05-27 21:46:10 UTC (rev 36958)
@@ -116,6 +116,14 @@
rna_userdef_update(bmain, scene, ptr);
}
+static void rna_userdef_gl_use_texture_highres(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ GPU_free_images();
+ rna_userdef_update(bmain, scene, ptr);
+}
+
+
+
static void rna_userdef_select_mouse_set(PointerRNA *ptr,int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -2547,6 +2555,11 @@
RNA_def_property_ui_text(prop, "Mipmaps", "Scale textures for the 3D View (looks nicer but uses more memory and slows image reloading)");
RNA_def_property_update(prop, 0, "rna_userdef_mipmap_update");
+ prop= RNA_def_property(srna, "use_highres_tex", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "hirestex", 1);
+ RNA_def_property_ui_text(prop, "High Resolution Float Textures", "Use 16 bit texture for float images.");
+ RNA_def_property_update(prop, 0, "rna_userdef_gl_use_texture_highres");
+
prop= RNA_def_property(srna, "use_vertex_buffer_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_VBO);
RNA_def_property_ui_text(prop, "VBOs", "Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering");
More information about the Bf-blender-cvs
mailing list