OpenGL: rename simple shader to basic shader.
[blender-staging.git] / source / blender / gpu / SConscript
1 #!/usr/bin/env python
2 #
3 # ***** BEGIN GPL LICENSE BLOCK *****
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 #
19 # The Original Code is Copyright (C) 2006, Blender Foundation
20 # All rights reserved.
21 #
22 # The Original Code is: all of this file.
23 #
24 # Contributor(s): Nathan Letwory.
25 #
26 # ***** END GPL LICENSE BLOCK *****
27
28 Import ('env')
29
30 sources = env.Glob('intern/*.c')
31 sources += env.Glob('shaders/*.c')
32
33 defs = []
34 defs += env['BF_GL_DEFINITIONS']
35
36 incs = [
37     '.',
38     '#/intern/glew-mx',
39     '#/intern/guardedalloc',
40     env['BF_GLEW_INC'],
41     '#/intern/smoke/extern',
42     '../blenkernel',
43     '../blenlib',
44     '../bmesh',
45     '../imbuf',
46     '../include',
47     '../makesdna',
48     '../makesrna',
49     '../nodes',
50     '../nodes/intern',
51     ]
52
53 if env['WITH_BF_GAMEENGINE']:
54     defs.append('WITH_GAMEENGINE')
55 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
56     incs.append(env['BF_PTHREADS_INC'])
57
58 if env['WITH_BF_SMOKE']:
59     defs.append('WITH_SMOKE')
60
61 if env['WITH_BF_DDS']:
62     defs.append('WITH_DDS')
63
64 if env['WITH_BF_OPENSUBDIV']:
65     defs.append('WITH_OPENSUBDIV')
66
67 # generated data files
68 import os
69 sources.extend((
70     os.path.join(env['DATA_SOURCES'], "gpu_shader_geometry.glsl.c"),
71     os.path.join(env['DATA_SOURCES'], "gpu_program_smoke_frag.glsl.c"),
72     os.path.join(env['DATA_SOURCES'], "gpu_program_smoke_color_frag.glsl.c"),
73     os.path.join(env['DATA_SOURCES'], "gpu_shader_basic_frag.glsl.c"),
74     os.path.join(env['DATA_SOURCES'], "gpu_shader_basic_vert.glsl.c"),
75     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_ssao_frag.glsl.c"),
76     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_dof_hq_frag.glsl.c"),
77     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_dof_hq_vert.glsl.c"),
78     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_dof_hq_geo.glsl.c"),
79     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_dof_frag.glsl.c"),
80     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_dof_vert.glsl.c"),
81     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_depth_resolve.glsl.c"),
82     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_lib.glsl.c"),
83     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_vert.glsl.c"),
84     os.path.join(env['DATA_SOURCES'], "gpu_shader_material.glsl.c"),
85     os.path.join(env['DATA_SOURCES'], "gpu_shader_sep_gaussian_blur_frag.glsl.c"),
86     os.path.join(env['DATA_SOURCES'], "gpu_shader_sep_gaussian_blur_vert.glsl.c"),
87     os.path.join(env['DATA_SOURCES'], "gpu_shader_vertex.glsl.c"),
88     os.path.join(env['DATA_SOURCES'], "gpu_shader_vertex_world.glsl.c"),
89     os.path.join(env['DATA_SOURCES'], "gpu_shader_vsm_store_frag.glsl.c"),
90     os.path.join(env['DATA_SOURCES'], "gpu_shader_vsm_store_vert.glsl.c"),
91     ))
92
93 env.BlenderLib('bf_gpu', sources, incs, defines=defs, libtype=['core', 'player'], priority=[160, 110])