2
0

BsGLSLProgramFactory.cpp 918 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. SPtr<GpuProgramCore> GLSLProgramFactory::create(const String& source, const String& entryPoint,
  11. GpuProgramType gptype, GpuProgramProfile profile, bool requireAdjacency)
  12. {
  13. GLSLGpuProgramCore* prog = new (bs_alloc<GLSLGpuProgramCore, GenAlloc>()) GLSLGpuProgramCore(source, entryPoint, gptype, profile, requireAdjacency);
  14. return bs_shared_ptr<GLSLGpuProgramCore, GenAlloc>(prog);
  15. }
  16. SPtr<GpuProgramCore> GLSLProgramFactory::create(GpuProgramType type)
  17. {
  18. GLSLGpuProgramCore* prog = new (bs_alloc<GLSLGpuProgramCore, GenAlloc>()) GLSLGpuProgramCore("", "", type, GPP_NONE, false);
  19. return bs_shared_ptr<GLSLGpuProgramCore, GenAlloc>(prog);
  20. }
  21. }