2004-05-16 13:07:20 +00:00
|
|
|
#!/usr/bin/python
|
2006-02-04 14:15:10 +00:00
|
|
|
Import ('env')
|
2004-02-29 21:40:48 +00:00
|
|
|
|
2011-05-05 09:43:45 +00:00
|
|
|
sources = env.Glob('intern/source/*.c') + env.Glob('intern/pipeline/*.c')
|
2009-12-10 01:11:04 +00:00
|
|
|
raysources = env.Glob('intern/raytrace/*.cpp')
|
|
|
|
|
|
|
|
|
|
incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna ../makesrna'
|
|
|
|
|
incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf'
|
2011-02-15 09:24:35 +00:00
|
|
|
incs += ' ../include ../blenloader ../../../intern/smoke/extern ../../../intern/mikktspace'
|
2009-12-10 01:11:04 +00:00
|
|
|
|
2010-07-20 10:22:49 +00:00
|
|
|
cflags_raytrace = env['CCFLAGS']
|
|
|
|
|
cxxflags_raytrace = env['CXXFLAGS']
|
2009-12-05 01:07:42 +00:00
|
|
|
|
2009-12-10 00:51:13 +00:00
|
|
|
defs = []
|
2010-07-20 10:22:49 +00:00
|
|
|
defs_raytrace = []
|
2009-12-10 00:51:13 +00:00
|
|
|
|
Blender modifications for Cycles integration.
Some notes about code status:
* The Blender modifications were fairly quickly put together, much more code
polish and work is needed to get this to a state where it can be committed
to trunk. Files created with this version may not work in future versions.
* Only simple path tracing is supported currently, but we intend to provide
finer control, and more options where it makes sense.
* For GPU rendering, only CUDA works currently. The intention is to have the
same kernel code compile for C++/OpenCL/CUDA, some more work is needed to
get OpenCL functional.
* There are two shading backends: GPU compatible and Open Shading Language.
Unfortunately, OSL only runs on the CPU currently, getting this to run on
the GPU would be a major undertaking, and is unlikely to be supported soon.
Additionally, it's not possible yet to write custom OSL shaders.
* There is some code for adaptive subdivision and displacement, but it's far
from finished. The intention is to eventually have a nice unified bump and
displacement system.
* The code currently has a number of fairly heavy dependencies: Boost,
OpenImageIO, GLEW, GLUT, and optionally OSL, Partio. This makes it difficult
to compile, we'll try to eliminate some, it may take a while before it
becomes easy to compile this.
2011-04-27 14:36:02 +00:00
|
|
|
if env['WITH_BF_PYTHON']:
|
|
|
|
|
incs += ' ../python'
|
|
|
|
|
incs += ' ' + env['BF_PYTHON_INC']
|
|
|
|
|
defs.append('WITH_PYTHON')
|
|
|
|
|
if env['BF_DEBUG']:
|
|
|
|
|
defs.append('DEBUG')
|
|
|
|
|
|
2009-12-05 01:07:42 +00:00
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
2009-12-05 00:26:20 +00:00
|
|
|
if env['WITH_BF_RAYOPTIMIZATION']:
|
2010-07-20 10:22:49 +00:00
|
|
|
cflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
|
|
|
|
|
cxxflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
|
2009-12-05 01:07:42 +00:00
|
|
|
|
|
|
|
|
if env['OURPLATFORM'] == 'win32-mingw':
|
|
|
|
|
if env['WITH_BF_RAYOPTIMIZATION']:
|
2010-07-20 10:22:49 +00:00
|
|
|
cflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
|
|
|
|
|
cxxflags_raytrace = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
|
2009-11-09 17:52:13 +00:00
|
|
|
|
|
|
|
|
if env['OURPLATFORM'] == 'darwin':
|
2009-12-05 00:26:20 +00:00
|
|
|
if env['MACOSX_ARCHITECTURE'] in ('i386', 'x86_64') and env['WITH_BF_RAYOPTIMIZATION']:
|
2010-07-20 10:22:49 +00:00
|
|
|
cflags_raytrace = env['CFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
|
|
|
|
|
cxxflags_raytrace = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
|
2009-12-10 00:51:13 +00:00
|
|
|
|
|
|
|
|
if env['OURPLATFORM'] == 'linux2':
|
|
|
|
|
if env['WITH_BF_RAYOPTIMIZATION']:
|
2010-07-20 10:22:49 +00:00
|
|
|
cflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
|
|
|
|
|
cxxflags_raytrace = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
|
2009-12-10 00:51:13 +00:00
|
|
|
incs += ' ../../../extern/binreloc/include'
|
2009-10-06 10:23:25 +00:00
|
|
|
|
2010-02-01 18:39:41 +00:00
|
|
|
if env['OURPLATFORM'] == 'linuxcross':
|
|
|
|
|
if env['WITH_BF_RAYOPTIMIZATION']:
|
2010-07-20 10:22:49 +00:00
|
|
|
cflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
|
|
|
|
|
cxxflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
|
2010-02-01 18:39:41 +00:00
|
|
|
|
2008-10-22 11:28:10 +00:00
|
|
|
if env['WITH_BF_QUICKTIME']:
|
2006-02-19 22:21:45 +00:00
|
|
|
defs.append('WITH_QUICKTIME')
|
2008-11-11 14:14:22 +00:00
|
|
|
incs += ' ../quicktime ' + env['BF_QUICKTIME_INC']
|
2004-01-04 21:11:59 +00:00
|
|
|
|
2006-02-23 21:37:29 +00:00
|
|
|
if env['WITH_BF_OPENEXR']:
|
|
|
|
|
defs.append('WITH_OPENEXR')
|
|
|
|
|
|
2009-10-01 16:32:33 +00:00
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
|
|
|
|
|
incs += ' ' + env['BF_PTHREADS_INC']
|
|
|
|
|
|
2010-02-01 18:39:41 +00:00
|
|
|
#
|
|
|
|
|
# HACK: To fix problem with error 'MMX instruction set not enabled' from mmintrin.h
|
|
|
|
|
#
|
|
|
|
|
if env['OURPLATFORM'] == 'linuxcross':
|
2010-07-20 10:22:49 +00:00
|
|
|
defs.append('__SSE__')
|
|
|
|
|
defs_raytrace.append('__MMX__')
|
2010-02-01 18:39:41 +00:00
|
|
|
|
2009-12-05 00:26:20 +00:00
|
|
|
if env['WITH_BF_RAYOPTIMIZATION']:
|
|
|
|
|
defs.append('__SSE__')
|
2010-07-20 10:22:49 +00:00
|
|
|
defs_raytrace.append('__SSE__')
|
2009-12-05 00:26:20 +00:00
|
|
|
|
2010-07-20 10:22:49 +00:00
|
|
|
env.BlenderLib ( libname = 'bf_render', sources = sources, includes = Split(incs), defines=defs, libtype='core', priority=145 )
|
|
|
|
|
env.BlenderLib ( libname = 'bf_render_raytrace', sources = raysources, includes = Split(incs), defines=defs_raytrace, libtype='core', priority=145, compileflags=cflags_raytrace, cxx_compileflags=cxxflags_raytrace )
|