| 
									
										
										
										
											2004-05-16 13:07:20 +00:00
										 |  |  | #!/usr/bin/python | 
					
						
							| 
									
										
										
										
											2006-02-04 14:15:10 +00:00
										 |  |  | Import ('env') | 
					
						
							| 
									
										
										
										
											2011-09-11 15:17:54 +00:00
										 |  |  | import os | 
					
						
							| 
									
										
										
										
											2004-02-29 21:40:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-20 16:24:50 +00:00
										 |  |  | sources = env.Glob('intern/*.c') | 
					
						
							| 
									
										
										
										
											2004-01-04 21:11:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-14 00:37:27 +00:00
										 |  |  | incs = '. #/intern/guardedalloc #/intern/memutil' | 
					
						
							| 
									
										
										
										
											2009-12-13 19:45:23 +00:00
										 |  |  | incs += ' ../blenlib ../blenfont ../makesdna ../windowmanager' | 
					
						
							| 
									
										
										
										
											2008-12-18 02:56:48 +00:00
										 |  |  | incs += ' ../render/extern/include #/intern/decimation/extern ../makesrna' | 
					
						
							| 
									
										
										
										
											2010-04-11 22:12:30 +00:00
										 |  |  | incs += ' ../imbuf ../ikplugin ../avi #/intern/elbeem/extern ../nodes ../modifiers' | 
					
						
							| 
									
										
										
										
											2008-11-11 14:14:22 +00:00
										 |  |  | incs += ' #/intern/iksolver/extern ../blenloader' | 
					
						
							| 
									
										
										
										
											2008-01-29 21:01:12 +00:00
										 |  |  | incs += ' #/extern/bullet2/src' | 
					
						
							| 
									
										
										
										
											2009-01-07 17:25:17 +00:00
										 |  |  | incs += ' #/intern/opennl/extern #/intern/bsp/extern' | 
					
						
							| 
									
										
											  
											
												
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
  menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
  gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
  storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
  An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
  needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
  be at the origin.
											
										 
											2008-09-04 20:51:28 +00:00
										 |  |  | incs += ' ../gpu #/extern/glew/include' | 
					
						
							| 
									
										
										
										
											2009-05-16 16:18:08 +00:00
										 |  |  | incs += ' ../bmesh' | 
					
						
							| 
									
										
										
										
											2009-07-30 15:00:26 +00:00
										 |  |  | incs += ' #/intern/smoke/extern' | 
					
						
							| 
									
										
										
										
											2011-02-15 09:24:35 +00:00
										 |  |  | incs += ' #/intern/mikktspace' | 
					
						
							| 
									
										
										
										
											2009-08-10 19:22:50 +00:00
										 |  |  | incs += ' #/intern/audaspace/intern' | 
					
						
							| 
									
										
										
										
											2011-05-27 23:33:40 +00:00
										 |  |  | incs += ' #/intern/ffmpeg' | 
					
						
							| 
									
										
										
										
											2012-06-04 16:42:58 +00:00
										 |  |  | incs += ' #/intern/raskter' | 
					
						
							| 
									
										
										
										
											2004-01-04 21:11:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-02-04 14:15:10 +00:00
										 |  |  | incs += ' ' + env['BF_OPENGL_INC'] | 
					
						
							|  |  |  | incs += ' ' + env['BF_ZLIB_INC'] | 
					
						
							| 
									
										
										
										
											2004-01-04 21:11:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-21 20:36:03 +00:00
										 |  |  | defs = [ 'GLEW_STATIC' ] | 
					
						
							| 
									
										
										
										
											2004-02-23 14:39:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-14 21:55:38 +00:00
										 |  |  | if env['WITH_BF_SMOKE']: | 
					
						
							|  |  |  |     defs.append('WITH_SMOKE') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-14 22:19:29 +00:00
										 |  |  | if env['WITH_BF_FRAMESERVER']: | 
					
						
							|  |  |  |     defs.append('WITH_FRAMESERVER') | 
					
						
							| 
									
										
										
										
											2011-07-13 18:40:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-31 04:11:39 +00:00
										 |  |  | if env['WITH_BF_PYTHON']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     incs += ' ../python' | 
					
						
							| 
									
										
										
										
											2010-10-31 04:11:39 +00:00
										 |  |  |     defs.append('WITH_PYTHON') | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     if env['BF_DEBUG']: | 
					
						
							| 
									
										
										
										
											2010-10-18 07:24:08 +00:00
										 |  |  |         defs.append('DEBUG') | 
					
						
							| 
									
										
										
										
											2008-10-28 18:47:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-01 21:39:13 +00:00
										 |  |  | if env['WITH_BF_ELTOPO']: | 
					
						
							|  |  |  |     incs += ' ../../../extern/eltopo' | 
					
						
							| 
									
										
										
										
											2011-05-02 03:44:02 +00:00
										 |  |  |     defs.append('WITH_ELTOPO') | 
					
						
							| 
									
										
										
										
											2011-05-01 21:39:13 +00:00
										 |  |  |          | 
					
						
							| 
									
										
										
										
											2008-11-11 14:14:22 +00:00
										 |  |  | if env['WITH_BF_QUICKTIME']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     incs += ' ../quicktime' | 
					
						
							| 
									
										
										
										
											2008-11-11 14:14:22 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if env['WITH_BF_SDL']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     incs += ' ' + env['BF_SDL_INC'] | 
					
						
							| 
									
										
										
										
											2011-10-20 00:19:21 +00:00
										 |  |  |     defs.append('WITH_SDL') | 
					
						
							| 
									
										
										
										
											2008-11-11 14:14:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-10-22 11:28:10 +00:00
										 |  |  | if env['WITH_BF_OPENEXR']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     defs.append('WITH_OPENEXR') | 
					
						
							| 
									
										
										
										
											2004-06-04 12:58:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-05-21 03:25:38 +00:00
										 |  |  | if env['WITH_BF_TIFF']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     defs.append('WITH_TIFF') | 
					
						
							| 
									
										
										
										
											2010-05-21 03:25:38 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-26 08:34:40 +00:00
										 |  |  | if env['WITH_BF_OPENJPEG']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     defs.append('WITH_OPENJPEG') | 
					
						
							| 
									
										
										
										
											2009-01-26 08:34:40 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-10-22 11:28:10 +00:00
										 |  |  | if env['WITH_BF_DDS']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     defs.append('WITH_DDS') | 
					
						
							| 
									
										
										
										
											2007-06-25 19:50:25 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-03 11:25:34 +00:00
										 |  |  | if env['WITH_BF_CINEON']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     defs.append('WITH_CINEON') | 
					
						
							| 
									
										
										
										
											2010-08-03 11:25:34 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if env['WITH_BF_HDR']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     defs.append('WITH_HDR') | 
					
						
							| 
									
										
										
										
											2010-08-03 11:25:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-02 15:27:55 +00:00
										 |  |  | if env['WITH_BF_JACK']: | 
					
						
							|  |  |  |     defs.append('WITH_JACK') | 
					
						
							| 
									
										
										
										
											2010-08-03 11:25:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-10-22 11:28:10 +00:00
										 |  |  | if env['WITH_BF_FFMPEG']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     defs.append('WITH_FFMPEG') | 
					
						
							|  |  |  |     incs += ' ' + env['BF_FFMPEG_INC'] | 
					
						
							| 
									
										
										
										
											2006-02-05 19:12:25 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-10-22 11:28:10 +00:00
										 |  |  | if env['WITH_BF_QUICKTIME']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     defs.append('WITH_QUICKTIME') | 
					
						
							|  |  |  |     incs += ' ' + env['BF_QUICKTIME_INC'] | 
					
						
							| 
									
										
										
										
											2005-04-05 15:02:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-26 08:34:40 +00:00
										 |  |  | if env['WITH_BF_BULLET']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     defs.append('USE_BULLET') | 
					
						
							| 
									
										
										
										
											2009-01-26 08:34:40 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-07 14:25:09 +00:00
										 |  |  | if env['OURPLATFORM'] == 'darwin': | 
					
						
							|  |  |  |     if env['WITH_BF_OPENMP']: | 
					
						
							|  |  |  |        defs.append('PARALLEL=1') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-29 23:56:07 +00:00
										 |  |  | if env['WITH_BF_FLUID']: | 
					
						
							|  |  |  |     defs.append('WITH_MOD_FLUID') | 
					
						
							| 
									
										
										
										
											2006-02-04 14:15:10 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-13 12:17:27 +00:00
										 |  |  | if env['WITH_BF_OCEANSIM']: | 
					
						
							|  |  |  |     defs.append('WITH_OCEANSIM') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-22 23:22:05 +00:00
										 |  |  | if env['WITH_BF_LZO']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     incs += ' #/extern/lzo/minilzo' | 
					
						
							|  |  |  |     defs.append('WITH_LZO') | 
					
						
							| 
									
										
										
										
											2009-10-22 23:22:05 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if env['WITH_BF_LZMA']: | 
					
						
							| 
									
										
										
										
											2010-08-29 20:52:05 +00:00
										 |  |  |     incs += ' #/extern/lzma' | 
					
						
							|  |  |  |     defs.append('WITH_LZMA') | 
					
						
							| 
									
										
										
										
											2009-10-22 23:22:05 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-11 14:13:04 +00:00
										 |  |  | if env['WITH_BF_GAMEENGINE']: | 
					
						
							| 
									
										
										
										
											2011-09-20 16:24:50 +00:00
										 |  |  |     incs += ' #/extern/recastnavigation' | 
					
						
							| 
									
										
										
										
											2011-09-11 14:13:04 +00:00
										 |  |  |     defs.append('WITH_GAMEENGINE') | 
					
						
							|  |  |  | else: | 
					
						
							| 
									
										
										
										
											2011-09-20 16:24:50 +00:00
										 |  |  |     sources.remove('intern' + os.sep + 'navmesh_conversion.c') | 
					
						
							| 
									
										
										
										
											2011-09-11 14:13:04 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-07 12:55:18 +00:00
										 |  |  | if env['WITH_BF_LIBMV']: | 
					
						
							|  |  |  |     incs += ' #/extern/libmv' | 
					
						
							|  |  |  |     defs.append('WITH_LIBMV') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-13 12:17:27 +00:00
										 |  |  | if env['WITH_BF_FFTW3']: | 
					
						
							|  |  |  |     defs.append('FFTW3=1') | 
					
						
							|  |  |  |     incs += ' ' + env['BF_FFTW3_INC']  | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-17 12:07:58 +00:00
										 |  |  | if env['WITH_BF_INTERNATIONAL']: | 
					
						
							|  |  |  |     defs.append('WITH_INTERNATIONAL') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-24 12:57:58 +00:00
										 |  |  | if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): | 
					
						
							| 
									
										
										
										
											2009-01-12 19:14:33 +00:00
										 |  |  |     incs += ' ' + env['BF_PTHREADS_INC'] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-21 07:39:18 +00:00
										 |  |  | if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): | 
					
						
							| 
									
										
										
										
											2010-10-26 23:32:59 +00:00
										 |  |  |     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25]) #, cc_compileflags = env['CCFLAGS'].append('/WX') ) | 
					
						
							| 
									
										
										
										
											2010-10-21 07:39:18 +00:00
										 |  |  | else: | 
					
						
							| 
									
										
										
										
											2010-12-21 00:21:42 +00:00
										 |  |  |     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player', 'player2'], priority = [166,25,0] ) |