CustomDX11API.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. #include <Shader.h>
  2. #include "CustomDX11API.h"
  3. #include "CustomUIDX11PixelShader.h"
  4. #include "CustomUIDX11VertexShader.h"
  5. using namespace Framework;
  6. CustomDX11API::CustomDX11API()
  7. : DirectX11(),
  8. vertexShaderLightBufferIndex(-1)
  9. {}
  10. Framework::DX11VertexShader* CustomDX11API::initializeVertexShader(unsigned char* byteCode, int size)
  11. {
  12. DX11VertexShader* shader = DirectX11::initializeVertexShader((unsigned char*)CustomUIDX11VertexShader, sizeof(CustomUIDX11VertexShader));
  13. vertexShaderLightBufferIndex = shader->getFirstUninitializedBufferIndex();
  14. shader->erstelleConstBuffer(4 + 4 * 3 * 24, vertexShaderLightBufferIndex);
  15. return shader;
  16. }
  17. Framework::DX11PixelShader* CustomDX11API::initializePixelShader(unsigned char* byteCode, int size)
  18. {
  19. DX11PixelShader* shader = DirectX11::initializePixelShader((unsigned char*)CustomUIDX11PixelShader, sizeof(CustomUIDX11PixelShader));
  20. return shader;
  21. }
  22. int CustomDX11API::getVertexShaderLightBufferIndex() const
  23. {
  24. return vertexShaderLightBufferIndex;
  25. }