SCsub 843 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env python
  2. from misc.utility.scons_hints import *
  3. Import("env")
  4. if "RD_GLSL" in env["BUILDERS"]:
  5. # find just the include files
  6. gl_include_files = [str(f) for f in Glob("*_inc.glsl")]
  7. # find all shader code (all glsl files excluding our include files)
  8. glsl_files = [str(f) for f in Glob("*.glsl") if str(f) not in gl_include_files]
  9. # make sure we recompile shaders if include files change
  10. env.Depends([f + ".gen.h" for f in glsl_files], gl_include_files + ["#glsl_builders.py"])
  11. # compile include files
  12. for glsl_file in gl_include_files:
  13. env.GLSL_HEADER(glsl_file)
  14. # compile RD shader
  15. for glsl_file in glsl_files:
  16. env.RD_GLSL(glsl_file)
  17. SConscript("effects/SCsub")
  18. SConscript("environment/SCsub")
  19. SConscript("forward_clustered/SCsub")
  20. SConscript("forward_mobile/SCsub")