1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00
xn65/inc/xna/graphics/shader.hpp

42 lines
1.0 KiB
C++
Raw Normal View History

2024-04-09 15:15:11 -03:00
#ifndef XNA_GRAPHICS_SHADER_HPP
#define XNA_GRAPHICS_SHADER_HPP
#include "../default.hpp"
2024-05-22 17:43:29 -03:00
#include "gresource.hpp"
2024-04-09 15:15:11 -03:00
namespace xna {
2024-05-22 17:43:29 -03:00
class Shader : public GraphicsResource {
2024-04-09 15:15:11 -03:00
public:
2024-05-22 17:43:29 -03:00
Shader();
Shader(sptr<GraphicsDevice> const& device);
2024-05-23 09:46:11 -03:00
~Shader() override {}
2024-05-22 17:43:29 -03:00
bool Initialize(DataBuffer& buffer, xna_error_nullarg);
static bool CompileFromFile(WString srcFile, String entryPoint, String profile, DataBuffer& blob);
};
class VertexShader : public Shader {
public:
VertexShader();
VertexShader(sptr<GraphicsDevice> const& device);
2024-05-23 09:46:11 -03:00
~VertexShader() override;
2024-05-22 17:43:29 -03:00
bool Initialize(DataBuffer& buffer, xna_error_nullarg);
public:
struct PlatformImplementation;
uptr<PlatformImplementation> impl = nullptr;
};
class PixelShader : public Shader {
public:
PixelShader();
PixelShader(sptr<GraphicsDevice> const& device);
2024-05-23 09:46:11 -03:00
~PixelShader() override;
2024-05-22 17:43:29 -03:00
bool Initialize(DataBuffer& buffer, xna_error_nullarg);
public:
struct PlatformImplementation;
uptr<PlatformImplementation> impl = nullptr;
2024-04-09 15:15:11 -03:00
};
}
#endif