mirror of
https://github.com/borgesdan/xn65
synced 2024-12-29 21:54:47 +01:00
42 lines
1.0 KiB
C++
42 lines
1.0 KiB
C++
#ifndef XNA_GRAPHICS_SHADER_HPP
|
|
#define XNA_GRAPHICS_SHADER_HPP
|
|
|
|
#include "../default.hpp"
|
|
#include "gresource.hpp"
|
|
|
|
namespace xna {
|
|
class Shader : public GraphicsResource {
|
|
public:
|
|
Shader();
|
|
Shader(sptr<GraphicsDevice> const& device);
|
|
~Shader() override {}
|
|
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);
|
|
~VertexShader() override;
|
|
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);
|
|
~PixelShader() override;
|
|
bool Initialize(DataBuffer& buffer, xna_error_nullarg);
|
|
|
|
public:
|
|
struct PlatformImplementation;
|
|
uptr<PlatformImplementation> impl = nullptr;
|
|
};
|
|
}
|
|
|
|
#endif |