Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.02 KB

program_listing_file_rootex_core_renderer_shader.h.rst

File metadata and controls

39 lines (26 loc) · 1.02 KB

Program Listing for File shader.h

Return to documentation for file <file_rootex_core_renderer_shader.h> (rootex\core\renderer\shader.h)

#pragma once

#include "common/common.h"

#include "buffer_format.h"
#include "constant_buffer.h"
#include "rendering_device.h"
#include "texture.h"

class Shader
{
public:
    Microsoft::WRL::ComPtr<ID3D11VertexShader> m_VertexShader;
    Microsoft::WRL::ComPtr<ID3D11PixelShader> m_PixelShader;
    Microsoft::WRL::ComPtr<ID3D11InputLayout> m_InputLayout;

    bool m_IsValid = true;

public:
    Shader() = default;
    Shader(const String& vertexPath, const String& pixelPath, const BufferFormat& vertexBufferFormat);
    ~Shader() = default;

    void bind() const;

    bool isValid() const { return m_IsValid; }
};