light/modules/renderer/private/dx/texture.hpp
light7734 d83e269432
Some checks reported errors
continuous-integration/drone/push Build was killed
refactor: move renderer gl/dx files to private section
2025-07-23 10:11:55 +03:30

35 lines
668 B
C++

#pragma once
#include <d3d11.h>
#include <renderer/texture.hpp>
#include <wrl.h>
namespace lt {
class dxSharedContext;
class dxTexture: public Texture
{
public:
dxTexture(
unsigned int width,
unsigned int height,
unsigned int components,
unsigned char *pixels,
Ref<dxSharedContext> sharedContext,
const std::string &filePath
);
void bind(unsigned int slot = 0u) override;
private:
Ref<dxSharedContext> m_context;
Microsoft::WRL::ComPtr<ID3D11Texture2D> m_texture_2d;
Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> m_shader_resource_view;
Microsoft::WRL::ComPtr<ID3D11SamplerState> m_sampler_state;
};
} // namespace lt