BsGLSLProgramFactory.cpp 936 B

123456789101112131415161718192021222324252627
  1. #include "BsGLSLProgramFactory.h"
  2. #include "BsGLSLGpuProgram.h"
  3. namespace BansheeEngine
  4. {
  5. const String GLSLProgramFactory::LANGUAGE_NAME = "glsl";
  6. const String& GLSLProgramFactory::getLanguage() const
  7. {
  8. return LANGUAGE_NAME;
  9. }
  10. GpuProgramPtr GLSLProgramFactory::create(const String& source, const String& entryPoint,
  11. GpuProgramType gptype, GpuProgramProfile profile, const Vector<HGpuProgInclude>* includes, bool requireAdjacency)
  12. {
  13. GLSLGpuProgram* prog = new (bs_alloc<GLSLGpuProgram, PoolAlloc>()) GLSLGpuProgram(source, entryPoint, gptype, profile, includes, requireAdjacency);
  14. return bs_core_ptr<GLSLGpuProgram, PoolAlloc>(prog);
  15. }
  16. GpuProgramPtr GLSLProgramFactory::create(GpuProgramType type)
  17. {
  18. GLSLGpuProgram* prog = new (bs_alloc<GLSLGpuProgram, PoolAlloc>()) GLSLGpuProgram("", "", type, GPP_NONE, nullptr, false);
  19. return bs_core_ptr<GLSLGpuProgram, PoolAlloc>(prog);
  20. }
  21. }