shaders: add compute shaders; fix shaders install dir

This commit is contained in:
Ivan Avdeev 2021-03-01 23:34:20 -08:00
parent dc71afd08a
commit 9b8af6d28b
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ def build(bld):
libs = [ 'public', 'M' ]
source = bld.path.ant_glob(['*.c'])
glsl_source = bld.path.ant_glob(['shaders/*.vert', 'shaders/*.frag'])
glsl_source = bld.path.ant_glob(['shaders/*.vert', 'shaders/*.frag', 'shaders/*.comp'])
includes = ['.',
'../engine',
@ -60,6 +60,6 @@ def build(bld):
features = 'glsl',
# includes = 'shaders/', # write your includes here
# defines = 'TEST', # write your C preprocessor defines here
install_path = '${LIBDIR}/valve' # TEMPORARY!!!!
install_path = bld.env.LIBDIR + '/valve' # TEMPORARY!!!!
)

View File

@ -31,7 +31,7 @@ class glsl(Task.Task):
def keyword(self):
return 'Compiling shader'
@TaskGen.extension('.vert', '.frag')
@TaskGen.extension('.vert', '.frag', '.comp')
def process_glsl_source(self, src):
# see ccroot.apply_incpaths
lst = self.to_incnodes(self.to_list(getattr(self, 'includes', [])) + self.env.GLSLCINCLUDES)