[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30328] branches/soc-2010-jwilkins: == Working Version ==
Jason Wilkins
Jason.A.Wilkins at gmail.com
Wed Jul 14 17:17:59 CEST 2010
Revision: 30328
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30328
Author: jwilkins
Date: 2010-07-14 17:17:59 +0200 (Wed, 14 Jul 2010)
Log Message:
-----------
== Working Version ==
* Had to remake some changes I made to scons files due to moved files.
Modified Paths:
--------------
branches/soc-2010-jwilkins/CMakeLists.txt
branches/soc-2010-jwilkins/build_files/scons/config/darwin-config.py
branches/soc-2010-jwilkins/build_files/scons/config/linux2-config.py
branches/soc-2010-jwilkins/build_files/scons/config/linuxcross-config.py
branches/soc-2010-jwilkins/build_files/scons/config/win32-mingw-config.py
branches/soc-2010-jwilkins/build_files/scons/config/win32-vc-config.py
branches/soc-2010-jwilkins/build_files/scons/config/win64-vc-config.py
branches/soc-2010-jwilkins/build_files/scons/tools/btools.py
branches/soc-2010-jwilkins/intern/ghost/SConscript
branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowCarbon.cpp
branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowCocoa.mm
branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowWin32.cpp
branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowX11.cpp
branches/soc-2010-jwilkins/release/scripts/ui/space_userpref.py
branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/SConscript
branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_ops.c
branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c
branches/soc-2010-jwilkins/source/blender/makesrna/SConscript
branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c
branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_sculpt_paint.c
branches/soc-2010-jwilkins/source/blender/windowmanager/SConscript
branches/soc-2010-jwilkins/source/blender/windowmanager/intern/wm_draw.c
branches/soc-2010-jwilkins/source/blender/windowmanager/intern/wm_operators.c
Modified: branches/soc-2010-jwilkins/CMakeLists.txt
===================================================================
--- branches/soc-2010-jwilkins/CMakeLists.txt 2010-07-14 14:56:33 UTC (rev 30327)
+++ branches/soc-2010-jwilkins/CMakeLists.txt 2010-07-14 15:17:59 UTC (rev 30328)
@@ -117,6 +117,7 @@
OPTION(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking" OFF)
OPTION(WITH_INSTALL "Install accompanying scripts and language files needed to run blender" ON)
+OPTION(WITH_ONSURFACEBRUSH "Enable use of the 'on-surface brush' for paint/sculpt. Requires a stencil buffer, GL_depth_texture, and GLSL" ON)
IF(APPLE)
OPTION(WITH_COCOA "Use Cocoa framework instead of deprecated Carbon" ON)
@@ -317,6 +318,10 @@
ADD_DEFINITIONS(-D__MMX__)
ENDIF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+ IF(WITH_ONSURFACEBRUSH)
+ ADD_DEFINITIONS(-DWITH_ONSURFACEBRUSH)
+ ENDIF(WITH_ONSURFACEBRUSH)
+
SET(PLATFORM_LINKFLAGS "-pthread")
# Better warnings
@@ -406,6 +411,10 @@
ADD_DEFINITIONS(-D__MMX__)
ENDIF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+ IF(WITH_ONSURFACEBRUSH)
+ ADD_DEFINITIONS(-DWITH_ONSURFACEBRUSH)
+ ENDIF(WITH_ONSURFACEBRUSH)
+
IF(MSVC)
IF(CMAKE_CL_64)
SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
@@ -814,6 +823,10 @@
ADD_DEFINITIONS(-D__MMX__)
ENDIF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+ IF(WITH_ONSURFACEBRUSH)
+ ADD_DEFINITIONS(-DWITH_ONSURFACEBRUSH)
+ ENDIF(WITH_ONSURFACEBRUSH)
+
SET(EXETYPE MACOSX_BUNDLE)
SET(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
Modified: branches/soc-2010-jwilkins/build_files/scons/config/darwin-config.py
===================================================================
--- branches/soc-2010-jwilkins/build_files/scons/config/darwin-config.py 2010-07-14 14:56:33 UTC (rev 30327)
+++ branches/soc-2010-jwilkins/build_files/scons/config/darwin-config.py 2010-07-14 15:17:59 UTC (rev 30328)
@@ -264,8 +264,10 @@
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
elif MACOSX_ARCHITECTURE == 'x86_64':
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-msse2']
-
+#On-Surface Brush
+WITH_BF_ONSURFACEBRUSH = True
+
#############################################################################
################### various compile settings and flags ##################
#############################################################################
Modified: branches/soc-2010-jwilkins/build_files/scons/config/linux2-config.py
===================================================================
--- branches/soc-2010-jwilkins/build_files/scons/config/linux2-config.py 2010-07-14 14:56:33 UTC (rev 30327)
+++ branches/soc-2010-jwilkins/build_files/scons/config/linux2-config.py 2010-07-14 15:17:59 UTC (rev 30328)
@@ -171,6 +171,9 @@
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
+#On-Surface Brush
+WITH_BF_ONSURFACEBRUSH = True
+
##
CC = 'gcc'
CXX = 'g++'
Modified: branches/soc-2010-jwilkins/build_files/scons/config/linuxcross-config.py
===================================================================
--- branches/soc-2010-jwilkins/build_files/scons/config/linuxcross-config.py 2010-07-14 14:56:33 UTC (rev 30327)
+++ branches/soc-2010-jwilkins/build_files/scons/config/linuxcross-config.py 2010-07-14 15:17:59 UTC (rev 30328)
@@ -172,6 +172,9 @@
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
+#On-Surface Brush
+WITH_BF_ONSURFACEBRUSH = True
+
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS']
Modified: branches/soc-2010-jwilkins/build_files/scons/config/win32-mingw-config.py
===================================================================
--- branches/soc-2010-jwilkins/build_files/scons/config/win32-mingw-config.py 2010-07-14 14:56:33 UTC (rev 30327)
+++ branches/soc-2010-jwilkins/build_files/scons/config/win32-mingw-config.py 2010-07-14 15:17:59 UTC (rev 30328)
@@ -158,6 +158,9 @@
WITH_BF_RAYOPTIMIZATION = False
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
+#On-Surface Brush
+WITH_BF_ONSURFACEBRUSH = True
+
##
CC = 'gcc'
CXX = 'g++'
Modified: branches/soc-2010-jwilkins/build_files/scons/config/win32-vc-config.py
===================================================================
--- branches/soc-2010-jwilkins/build_files/scons/config/win32-vc-config.py 2010-07-14 14:56:33 UTC (rev 30327)
+++ branches/soc-2010-jwilkins/build_files/scons/config/win32-vc-config.py 2010-07-14 15:17:59 UTC (rev 30328)
@@ -153,6 +153,9 @@
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
+#On-Surface Brush
+WITH_BF_ONSURFACEBRUSH = True
+
WITH_BF_STATICOPENGL = False
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
Modified: branches/soc-2010-jwilkins/build_files/scons/config/win64-vc-config.py
===================================================================
--- branches/soc-2010-jwilkins/build_files/scons/config/win64-vc-config.py 2010-07-14 14:56:33 UTC (rev 30327)
+++ branches/soc-2010-jwilkins/build_files/scons/config/win64-vc-config.py 2010-07-14 15:17:59 UTC (rev 30328)
@@ -166,6 +166,9 @@
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE','/arch:SSE2']
+#On-Surface Brush
+WITH_BF_ONSURFACEBRUSH = True
+
WITH_BF_STATICOPENGL = False
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
Modified: branches/soc-2010-jwilkins/build_files/scons/tools/btools.py
===================================================================
--- branches/soc-2010-jwilkins/build_files/scons/tools/btools.py 2010-07-14 14:56:33 UTC (rev 30327)
+++ branches/soc-2010-jwilkins/build_files/scons/tools/btools.py 2010-07-14 15:17:59 UTC (rev 30328)
@@ -83,6 +83,7 @@
'BF_GHOST_DEBUG',
'WITH_BF_RAYOPTIMIZATION',
'BF_RAYOPTIMIZATION_SSE_FLAGS',
+ 'WITH_BF_ONSURFACEBRUSH',
'BF_NO_ELBEEM',
'BF_VCREDIST' # Windows-only, and useful only when creating installer
]
@@ -443,6 +444,9 @@
(BoolVariable('WITH_BF_RAYOPTIMIZATION', 'Enable raytracer SSE/SIMD optimization.', False)),
('BF_RAYOPTIMIZATION_SSE_FLAGS', 'SSE flags', ''),
+
+ (BoolVariable('WITH_BF_ONSURFACEBRUSH', 'Enable use of the "on-surface brush" for paint/sculpt. Requires a stencil buffer, GL_depth_texture, and GLSL', True)),
+
('BF_VCREDIST', 'Full path to vcredist', '')
) # end of opts.AddOptions()
Modified: branches/soc-2010-jwilkins/intern/ghost/SConscript
===================================================================
--- branches/soc-2010-jwilkins/intern/ghost/SConscript 2010-07-14 14:56:33 UTC (rev 30327)
+++ branches/soc-2010-jwilkins/intern/ghost/SConscript 2010-07-14 15:17:59 UTC (rev 30328)
@@ -57,6 +57,9 @@
if env['BF_GHOST_DEBUG']:
defs.append('BF_GHOST_DEBUG')
+if env['WITH_BF_ONSURFACEBRUSH']:
+ defs.append('WITH_ONSURFACEBRUSH')
+
incs = '. ../string #extern/glew/include #source/blender/imbuf #source/blender/makesdna ' + env['BF_OPENGL_INC']
if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
incs = env['BF_WINTAB_INC'] + ' ' + incs
Modified: branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowCarbon.cpp
===================================================================
--- branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowCarbon.cpp 2010-07-14 14:56:33 UTC (rev 30327)
+++ branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowCarbon.cpp 2010-07-14 15:17:59 UTC (rev 30328)
@@ -47,6 +47,9 @@
AGL_DOUBLEBUFFER,
AGL_ACCELERATED,
AGL_DEPTH_SIZE, 32,
+#ifdef WITH_ONSURFACEBRUSH
+AGL_STENCIL_SIZE, 8,
+#endif
AGL_NONE,
};
@@ -56,6 +59,9 @@
AGL_ACCELERATED,
AGL_FULLSCREEN,
AGL_DEPTH_SIZE, 32,
+#ifdef WITH_ONSURFACEBRUSH
+AGL_STENCIL_SIZE, 8,
+#endif
AGL_NONE,
};
Modified: branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowCocoa.mm
===================================================================
--- branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowCocoa.mm 2010-07-14 14:56:33 UTC (rev 30327)
+++ branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowCocoa.mm 2010-07-14 15:17:59 UTC (rev 30328)
@@ -349,6 +349,11 @@
pixelFormatAttrsWindow[i++] = NSOpenGLPFAAccelerated;
//pixelFormatAttrsWindow[i++] = NSOpenGLPFAAllowOfflineRenderers,; // Removed to allow 10.4 builds, and 2 GPUs rendering is not used anyway
+#ifdef WITH_ONSURFACEBRUSH
+ pixelFormatAttrsWindow[i++] = NSOpenGLPFAStencilSize;
+ pixelFormatAttrsWindow[i++] = (NSOpenGLPixelFormatAttribute) 8;
+#endif
+
pixelFormatAttrsWindow[i++] = NSOpenGLPFADepthSize;
pixelFormatAttrsWindow[i++] = (NSOpenGLPixelFormatAttribute) 32;
@@ -359,6 +364,11 @@
// Multisample anti-aliasing
pixelFormatAttrsWindow[i++] = NSOpenGLPFAMultisample;
+#ifdef WITH_ONSURFACEBRUSH
+ pixelFormatAttrsWindow[i++] = NSOpenGLPFAStencilSize;
+ pixelFormatAttrsWindow[i++] = (NSOpenGLPixelFormatAttribute) 8;
+#endif
+
pixelFormatAttrsWindow[i++] = NSOpenGLPFASampleBuffers;
pixelFormatAttrsWindow[i++] = (NSOpenGLPixelFormatAttribute) 1;
Modified: branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowWin32.cpp 2010-07-14 14:56:33 UTC (rev 30327)
+++ branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowWin32.cpp 2010-07-14 15:17:59 UTC (rev 30328)
@@ -93,7 +93,11 @@
0, /* no accumulation buffer */
0, 0, 0, 0, /* accum bits (ignored) */
32, /* depth buffer */
+#ifdef WITH_ONSURFACEBRUSH
+ 8, /* stencil buffer */
+#else
0, /* no stencil buffer */
+#endif
0, /* no auxiliary buffers */
PFD_MAIN_PLANE, /* main layer */
0, /* reserved */
@@ -1093,7 +1097,11 @@
!(pfd.dwFlags & PFD_DRAW_TO_WINDOW) ||
!(pfd.dwFlags & PFD_DOUBLEBUFFER) || /* Blender _needs_ this */
( pfd.cDepthBits <= 8 ) ||
- !(pfd.iPixelType == PFD_TYPE_RGBA))
+ !(pfd.iPixelType == PFD_TYPE_RGBA)
+#ifdef WITH_ONSURFACEBRUSH
+ || ( pfd.cStencilBits == 0)
+#endif
+ )
return 0;
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list