[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40167] branches/bmesh/blender: svn merge -rr40148:40166 https://svn.blender.org/svnroot/bf-blender/trunk/ blender

Campbell Barton ideasman42 at gmail.com
Mon Sep 12 16:28:22 CEST 2011


Revision: 40167
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40167
Author:   campbellbarton
Date:     2011-09-12 14:28:21 +0000 (Mon, 12 Sep 2011)
Log Message:
-----------
svn merge -rr40148:40166 https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/bmesh/blender/CMakeLists.txt
    branches/bmesh/blender/build_files/cmake/macros.cmake
    branches/bmesh/blender/source/blender/blenfont/intern/blf_font.c
    branches/bmesh/blender/source/blender/blenfont/intern/blf_glyph.c
    branches/bmesh/blender/source/blender/blenfont/intern/blf_internal_types.h
    branches/bmesh/blender/source/blender/blenkernel/BKE_material.h
    branches/bmesh/blender/source/blender/blenkernel/intern/material.c
    branches/bmesh/blender/source/blender/blenkernel/intern/navmesh_conversion.cpp
    branches/bmesh/blender/source/blender/blenlib/BLI_math_matrix.h
    branches/bmesh/blender/source/blender/blenlib/intern/math_matrix.c
    branches/bmesh/blender/source/blender/collada/EffectExporter.cpp
    branches/bmesh/blender/source/blender/collada/EffectExporter.h
    branches/bmesh/blender/source/blender/collada/ErrorHandler.cpp
    branches/bmesh/blender/source/blender/gpu/intern/gpu_codegen.c
    branches/bmesh/blender/source/blender/gpu/intern/gpu_shader_material.glsl.c
    branches/bmesh/blender/source/blender/render/extern/include/RE_render_ext.h
    branches/bmesh/blender/source/blender/render/intern/include/pixelshading.h
    branches/bmesh/blender/source/blender/render/intern/include/shadbuf.h
    branches/bmesh/blender/source/blender/render/intern/include/shading.h
    branches/bmesh/blender/source/blender/render/intern/include/texture.h
    branches/bmesh/blender/source/blender/render/intern/include/volumetric.h
    branches/bmesh/blender/source/blender/render/intern/source/imagetexture.c
    branches/bmesh/blender/source/blender/render/intern/source/pixelshading.c
    branches/bmesh/blender/source/blender/render/intern/source/render_texture.c
    branches/bmesh/blender/source/blender/render/intern/source/shadbuf.c
    branches/bmesh/blender/source/blender/render/intern/source/volume_precache.c
    branches/bmesh/blender/source/blender/render/intern/source/volumetric.c

Property Changed:
----------------
    branches/bmesh/blender/
    branches/bmesh/blender/release/
    branches/bmesh/blender/source/blender/editors/space_outliner/


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:39992-40148
   + /trunk/blender:39992-40166

Modified: branches/bmesh/blender/CMakeLists.txt
===================================================================
--- branches/bmesh/blender/CMakeLists.txt	2011-09-12 13:59:23 UTC (rev 40166)
+++ branches/bmesh/blender/CMakeLists.txt	2011-09-12 14:28:21 UTC (rev 40167)
@@ -702,7 +702,7 @@
 				${LIBDIR}/opencollada/lib/ftoa.lib
 				${LIBDIR}/opencollada/lib/UTF.lib
 			)
-			set(PCRE_LIB
+			set(PCRE_LIBRARIES
 				${LIBDIR}/opencollada/lib/pcre.lib
 			)
 		endif()
@@ -844,7 +844,7 @@
 			)
 			set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
 			set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
-			set(PCRE_LIB pcre)
+			set(PCRE_LIBRARIES pcre)
 		endif()
 		
 		if(WITH_CODEC_FFMPEG)
@@ -1066,7 +1066,7 @@
 		#pcre is bundled with openCollada
 		#set(PCRE ${LIBDIR}/pcre)
 		#set(PCRE_LIBPATH ${PCRE}/lib)
-		set(PCRE_LIB pcre)
+		set(PCRE_LIBRARIES pcre)
 		#libxml2 is used
 		#set(EXPAT ${LIBDIR}/expat)
 		#set(EXPAT_LIBPATH ${EXPAT}/lib)

Modified: branches/bmesh/blender/build_files/cmake/macros.cmake
===================================================================
--- branches/bmesh/blender/build_files/cmake/macros.cmake	2011-09-12 13:59:23 UTC (rev 40166)
+++ branches/bmesh/blender/build_files/cmake/macros.cmake	2011-09-12 14:28:21 UTC (rev 40167)
@@ -295,10 +295,10 @@
 			target_link_libraries_optimized(${target} "${OPENCOLLADA_LIBRARIES}")
 			unset(OPENCOLLADA_LIBRARIES_DEBUG)
 
-			file_list_suffix(PCRE_LIB_DEBUG "${PCRE_LIB}" "_d")
-			target_link_libraries_debug(${target} "${PCRE_LIB_DEBUG}")
-			target_link_libraries_optimized(${target} "${PCRE_LIB}")
-			unset(PCRE_LIB_DEBUG)
+			file_list_suffix(PCRE_LIBRARIES_DEBUG "${PCRE_LIBRARIES}" "_d")
+			target_link_libraries_debug(${target} "${PCRE_LIBRARIES_DEBUG}")
+			target_link_libraries_optimized(${target} "${PCRE_LIBRARIES}")
+			unset(PCRE_LIBRARIES_DEBUG)
 
 			if(EXPAT_LIB)
 				file_list_suffix(EXPAT_LIB_DEBUG "${EXPAT_LIB}" "_d")
@@ -309,7 +309,8 @@
 		else()
 			target_link_libraries(${target}
 					${OPENCOLLADA_LIBRARIES}
-					${PCRE_LIB}
+					${PCRE_LIBRARIES}
+					${XML2_LIBRARIES}
 					${EXPAT_LIB})
 		endif()
 	endif()


Property changes on: branches/bmesh/blender/release
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender/release:31524-40148
   + /trunk/blender/release:31524-40166

Modified: branches/bmesh/blender/source/blender/blenfont/intern/blf_font.c
===================================================================
--- branches/bmesh/blender/source/blender/blenfont/intern/blf_font.c	2011-09-12 13:59:23 UTC (rev 40166)
+++ branches/bmesh/blender/source/blender/blenfont/intern/blf_font.c	2011-09-12 14:28:21 UTC (rev 40167)
@@ -100,7 +100,8 @@
 static void blf_font_ensure_ascii_table(FontBLF *font)
 {
 	/* build ascii on demand */
-	if(font->glyph_ascii_table['0']==NULL) {
+	if(font->glyph_cache->glyph_ascii_table['0']==NULL) {
+		GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 		GlyphBLF *g;
 		unsigned int i;
 		for(i=0; i<256; i++) {
@@ -109,7 +110,7 @@
 				FT_UInt glyph_index= FT_Get_Char_Index(font->face, i);
 				g= blf_glyph_add(font, glyph_index, i);
 			}
-			font->glyph_ascii_table[i]= g;
+			glyph_ascii_table[i]= g;
 		}
 	}
 }
@@ -122,9 +123,9 @@
 /* Note,
  * blf_font_ensure_ascii_table(font); must be called before this macro */
 
-#define BLF_UTF8_NEXT_FAST(font, g, str, i, c)                                \
+#define BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table)             \
 	if(((c)= (str)[i]) < 0x80) {                                              \
-		g= (font)->glyph_ascii_table[c];                                      \
+		g= glyph_ascii_table[c];                                              \
 		i++;                                                                  \
 	}                                                                         \
 	else if ((c= blf_utf8_next((unsigned char *)(str), &(i)))) {              \
@@ -143,9 +144,11 @@
 	int pen_x, pen_y;
 	int has_kerning, st;
 	unsigned int i;
+	GlyphBLF **glyph_ascii_table;
 
 	if (!font->glyph_cache)
 		return;
+	glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 
 	i= 0;
 	pen_x= 0;
@@ -157,7 +160,7 @@
 
 	while (str[i] && i < len) {
 
-		BLF_UTF8_NEXT_FAST(font, g, str, i, c);
+		BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
 
 		if (c == 0)
 			break;
@@ -195,9 +198,11 @@
 	FT_Vector delta;
 	int pen_x, pen_y;
 	int has_kerning, st;
+	GlyphBLF **glyph_ascii_table;
 
 	if (!font->glyph_cache)
 		return;
+	glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 
 	pen_x= 0;
 	pen_y= 0;
@@ -207,7 +212,7 @@
 	blf_font_ensure_ascii_table(font);
 
 	while ((c= *(str++)) && len--) {
-		g= font->glyph_ascii_table[c];
+		g= font->glyph_cache->glyph_ascii_table[c];
 
 		/* if we don't found a glyph, skip it. */
 		if (!g)
@@ -245,9 +250,11 @@
 	int pen_x, y, x;
 	int has_kerning, st, chx, chy;
 	unsigned int i;
+	GlyphBLF **glyph_ascii_table;
 
 	if (!font->glyph_cache || (!font->b_fbuf && !font->b_cbuf))
 		return;
+	glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 	
 	i= 0;
 	pen_x= (int)font->pos[0];
@@ -264,7 +271,7 @@
 	while (str[i]) {
 		int pen_y;
 
-		BLF_UTF8_NEXT_FAST(font, g, str, i, c);
+		BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
 
 		if (c == 0)
 			break;
@@ -390,9 +397,11 @@
 	int pen_x, pen_y;
 	int has_kerning, st;
 	unsigned int i;
+	GlyphBLF **glyph_ascii_table;
 
 	if (!font->glyph_cache)
 		return;
+	glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 
 	box->xmin= 32000.0f;
 	box->xmax= -32000.0f;
@@ -409,7 +418,7 @@
 
 	while (str[i]) {
 
-		BLF_UTF8_NEXT_FAST(font, g, str, i, c);
+		BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
 
 		if (c == 0)
 			break;
@@ -589,8 +598,6 @@
 	font->b_col[2]= 0;
 	font->b_col[3]= 0;
 	font->ft_lib= ft_lib;
-
-	memset(font->glyph_ascii_table, 0, sizeof(font->glyph_ascii_table));
 }
 
 FontBLF *blf_font_new(const char *name, const char *filename)

Modified: branches/bmesh/blender/source/blender/blenfont/intern/blf_glyph.c
===================================================================
--- branches/bmesh/blender/source/blender/blenfont/intern/blf_glyph.c	2011-09-12 13:59:23 UTC (rev 40166)
+++ branches/bmesh/blender/source/blender/blenfont/intern/blf_glyph.c	2011-09-12 14:28:21 UTC (rev 40167)
@@ -74,7 +74,6 @@
 GlyphCacheBLF *blf_glyph_cache_new(FontBLF *font)
 {
 	GlyphCacheBLF *gc;
-	int i;
 
 	gc= (GlyphCacheBLF *)MEM_mallocN(sizeof(GlyphCacheBLF), "blf_glyph_cache_new");
 	gc->next= NULL;
@@ -82,10 +81,8 @@
 	gc->size= font->size;
 	gc->dpi= font->dpi;
 
-	for (i= 0; i < 257; i++) {
-		gc->bucket[i].first= NULL;
-		gc->bucket[i].last= NULL;
-	}
+	memset(gc->glyph_ascii_table, 0, sizeof(gc->glyph_ascii_table));
+	memset(gc->bucket, 0, sizeof(gc->bucket));
 
 	gc->textures= (GLuint *)malloc(sizeof(GLuint)*256);
 	gc->ntex= 256;
@@ -136,7 +133,9 @@
 		}
 	}
 
-	memset(font->glyph_ascii_table, 0, sizeof(font->glyph_ascii_table));
+	if(font->glyph_cache) {
+		memset(font->glyph_cache->glyph_ascii_table, 0, sizeof(font->glyph_cache->glyph_ascii_table));
+	}
 }
 
 void blf_glyph_cache_free(GlyphCacheBLF *gc)

Modified: branches/bmesh/blender/source/blender/blenfont/intern/blf_internal_types.h
===================================================================
--- branches/bmesh/blender/source/blender/blenfont/intern/blf_internal_types.h	2011-09-12 13:59:23 UTC (rev 40166)
+++ branches/bmesh/blender/source/blender/blenfont/intern/blf_internal_types.h	2011-09-12 14:28:21 UTC (rev 40167)
@@ -46,6 +46,9 @@
 	/* and the glyphs. */
 	ListBase bucket[257];
 
+	/* fast ascii lookup */
+	struct GlyphBLF *glyph_ascii_table[256];
+
 	/* texture array, to draw the glyphs. */
 	GLuint *textures;
 
@@ -184,9 +187,6 @@
 
 	/* current glyph cache, size and dpi. */
 	GlyphCacheBLF *glyph_cache;
-	
-	/* fast ascii lookip */
-	GlyphBLF *glyph_ascii_table[256];
 
 	/* freetype2 lib handle. */
 	FT_Library ft_lib;

Modified: branches/bmesh/blender/source/blender/blenkernel/BKE_material.h
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/BKE_material.h	2011-09-12 13:59:23 UTC (rev 40166)
+++ branches/bmesh/blender/source/blender/blenkernel/BKE_material.h	2011-09-12 14:28:21 UTC (rev 40167)
@@ -89,7 +89,7 @@
 
 int material_in_material(struct Material *parmat, struct Material *mat);
 
-void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col);
+void ramp_blend(int type, float *r, float *g, float *b, float fac, const float col[3]);
 
 /* copy/paste */
 void clear_matcopybuf(void);

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/material.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/material.c	2011-09-12 13:59:23 UTC (rev 40166)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/material.c	2011-09-12 14:28:21 UTC (rev 40167)
@@ -1122,7 +1122,7 @@
 
 /* r g b = current value, col = new value, fac==0 is no change */
 /* if g==NULL, it only does r channel */
-void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col)
+void ramp_blend(int type, float *r, float *g, float *b, float fac, const float col[3])
 {
 	float tmp, facm= 1.0f-fac;
 	

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/navmesh_conversion.cpp
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/navmesh_conversion.cpp	2011-09-12 13:59:23 UTC (rev 40166)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/navmesh_conversion.cpp	2011-09-12 14:28:21 UTC (rev 40167)
@@ -28,6 +28,7 @@
 */
 
 #include <math.h>
+#include <stdlib.h>
 #include "Recast.h"
 
 extern "C"{

Modified: branches/bmesh/blender/source/blender/blenlib/BLI_math_matrix.h
===================================================================
--- branches/bmesh/blender/source/blender/blenlib/BLI_math_matrix.h	2011-09-12 13:59:23 UTC (rev 40166)

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list