CmD3D11HLSLProgramFactory.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #include "CmD3D11HLSLProgramFactory.h"
  2. #include "CmD3D11HLSLProgram.h"
  3. namespace BansheeEngine
  4. {
  5. String D3D11HLSLProgramFactory::sLanguageName = "hlsl";
  6. D3D11HLSLProgramFactory::D3D11HLSLProgramFactory()
  7. {
  8. }
  9. D3D11HLSLProgramFactory::~D3D11HLSLProgramFactory()
  10. {
  11. }
  12. const String& D3D11HLSLProgramFactory::getLanguage(void) const
  13. {
  14. return sLanguageName;
  15. }
  16. HighLevelGpuProgramPtr D3D11HLSLProgramFactory::create(const String& source, const String& entryPoint,
  17. GpuProgramType gptype, GpuProgramProfile profile, const Vector<HGpuProgInclude>::type* includes)
  18. {
  19. D3D11HLSLProgram* prog = new (cm_alloc<D3D11HLSLProgram, PoolAlloc>()) D3D11HLSLProgram(source, entryPoint, gptype, profile, includes);
  20. return cm_core_ptr<D3D11HLSLProgram, PoolAlloc>(prog);
  21. }
  22. HighLevelGpuProgramPtr D3D11HLSLProgramFactory::create()
  23. {
  24. D3D11HLSLProgram* prog = new (cm_alloc<D3D11HLSLProgram, PoolAlloc>()) D3D11HLSLProgram("", "", GPT_VERTEX_PROGRAM, GPP_NONE, nullptr);
  25. return cm_core_ptr<D3D11HLSLProgram, PoolAlloc>(prog);
  26. }
  27. }