Revision: 30252 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30252 Author: jwilkins Date: 2010-07-13 06:58:56 +0200 (Tue, 13 Jul 2010)
Log Message: ----------- * made the on-surface brush a configuration option Modified Paths: -------------- branches/soc-2010-jwilkins/CMakeLists.txt branches/soc-2010-jwilkins/config/CMakeLists.txt branches/soc-2010-jwilkins/config/darwin-config.py branches/soc-2010-jwilkins/config/linux2-config.py branches/soc-2010-jwilkins/config/linuxcross-config.py branches/soc-2010-jwilkins/config/win32-mingw-config.py branches/soc-2010-jwilkins/config/win32-vc-config.py branches/soc-2010-jwilkins/config/win64-vc-config.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_stroke.c branches/soc-2010-jwilkins/source/blender/makesrna/SConscript branches/soc-2010-jwilkins/source/blender/makesrna/intern/CMakeLists.txt branches/soc-2010-jwilkins/source/blender/makesrna/intern/SConscript 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 branches/soc-2010-jwilkins/tools/btools.py Modified: branches/soc-2010-jwilkins/CMakeLists.txt =================================================================== --- branches/soc-2010-jwilkins/CMakeLists.txt 2010-07-13 01:40:50 UTC (rev 30251) +++ branches/soc-2010-jwilkins/CMakeLists.txt 2010-07-13 04:58:56 UTC (rev 30252) @@ -114,9 +114,10 @@ OPTION(WITH_LZMA "Enable best LZMA compression, (used for pointcache)" ON) # Misc -OPTION(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON) +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_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/config/CMakeLists.txt =================================================================== --- branches/soc-2010-jwilkins/config/CMakeLists.txt 2010-07-13 01:40:50 UTC (rev 30251) +++ branches/soc-2010-jwilkins/config/CMakeLists.txt 2010-07-13 04:58:56 UTC (rev 30252) @@ -114,9 +114,10 @@ OPTION(WITH_LZMA "Enable best LZMA compression, (used for pointcache)" ON) # Misc -OPTION(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON) +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_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) @@ -316,6 +317,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 @@ -405,6 +410,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 ) @@ -812,6 +821,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/config/darwin-config.py =================================================================== --- branches/soc-2010-jwilkins/config/darwin-config.py 2010-07-13 01:40:50 UTC (rev 30251) +++ branches/soc-2010-jwilkins/config/darwin-config.py 2010-07-13 04:58:56 UTC (rev 30252) @@ -264,8 +264,11 @@ 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/config/linux2-config.py =================================================================== --- branches/soc-2010-jwilkins/config/linux2-config.py 2010-07-13 01:40:50 UTC (rev 30251) +++ branches/soc-2010-jwilkins/config/linux2-config.py 2010-07-13 04:58:56 UTC (rev 30252) @@ -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/config/linuxcross-config.py =================================================================== --- branches/soc-2010-jwilkins/config/linuxcross-config.py 2010-07-13 01:40:50 UTC (rev 30251) +++ branches/soc-2010-jwilkins/config/linuxcross-config.py 2010-07-13 04:58:56 UTC (rev 30252) @@ -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/config/win32-mingw-config.py =================================================================== --- branches/soc-2010-jwilkins/config/win32-mingw-config.py 2010-07-13 01:40:50 UTC (rev 30251) +++ branches/soc-2010-jwilkins/config/win32-mingw-config.py 2010-07-13 04:58:56 UTC (rev 30252) @@ -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/config/win32-vc-config.py =================================================================== --- branches/soc-2010-jwilkins/config/win32-vc-config.py 2010-07-13 01:40:50 UTC (rev 30251) +++ branches/soc-2010-jwilkins/config/win32-vc-config.py 2010-07-13 04:58:56 UTC (rev 30252) @@ -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/config/win64-vc-config.py =================================================================== --- branches/soc-2010-jwilkins/config/win64-vc-config.py 2010-07-13 01:40:50 UTC (rev 30251) +++ branches/soc-2010-jwilkins/config/win64-vc-config.py 2010-07-13 04:58:56 UTC (rev 30252) @@ -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/intern/ghost/SConscript =================================================================== --- branches/soc-2010-jwilkins/intern/ghost/SConscript 2010-07-13 01:40:50 UTC (rev 30251) +++ branches/soc-2010-jwilkins/intern/ghost/SConscript 2010-07-13 04:58:56 UTC (rev 30252) @@ -56,9 +56,11 @@ 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 env.BlenderLib ('bf_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15] ) - Modified: branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowCarbon.cpp =================================================================== --- branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowCarbon.cpp 2010-07-13 01:40:50 UTC (rev 30251) +++ branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowCarbon.cpp 2010-07-13 04:58:56 UTC (rev 30252) @@ -47,7 +47,9 @@ AGL_DOUBLEBUFFER, AGL_ACCELERATED, AGL_DEPTH_SIZE, 32, -AGL_STENCIL_SIZE, 1, +#ifdef WITH_ONSURFACEBRUSH +AGL_STENCIL_SIZE, 8, +#endif AGL_NONE, }; @@ -57,7 +59,9 @@ AGL_ACCELERATED, AGL_FULLSCREEN, AGL_DEPTH_SIZE, 32, -AGL_STENCIL_SIZE, 1, +#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-13 01:40:50 UTC (rev 30251) +++ branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowCocoa.mm 2010-07-13 04:58:56 UTC (rev 30252) @@ -348,9 +348,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; @@ -362,8 +364,10 @@ // 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 =================================================================== @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs