test_shadercompilerregistry.py 758 B

123456789101112131415161718
  1. from panda3d import core
  2. def test_shadercompilerregistry_exists(registry):
  3. assert registry is not None
  4. def test_shadercompilerregistry_glslpreproc_loaded(registry):
  5. assert core.ShaderCompilerGlslPreProc in [type(i) for i in registry.compilers]
  6. assert registry.get_compiler_from_language(core.Shader.SL_GLSL) is not None
  7. def test_shadercompilerregistry_cg_loaded(registry):
  8. assert core.ShaderCompilerCg in [type(i) for i in registry.compilers]
  9. assert registry.get_compiler_from_language(core.Shader.SL_Cg) is not None
  10. def test_shadercompilerregistry_missing_lang(registry):
  11. assert core.ShaderCompilerGlslPreProc in [type(i) for i in registry.compilers]
  12. assert registry.get_compiler_from_language(core.Shader.SL_none) is None