yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Ellie Hermaszewskaformatf65d756bf

master
836 B37 linesraw
1// metal-texture.h
2#pragma once
3
4#include "metal-base.h"
5#include "metal-device.h"
6
7namespace gfx
8{
9
10using namespace Slang;
11
12namespace metal
13{
14
15class TextureResourceImpl : public TextureResource
16{
17public:
18    typedef TextureResource Parent;
19
20    TextureResourceImpl(const Desc& desc, DeviceImpl* device);
21    ~TextureResourceImpl();
22
23    BreakableReference<DeviceImpl> m_device;
24    NS::SharedPtr<MTL::Texture> m_texture;
25    MTL::TextureType m_textureType;
26    MTL::PixelFormat m_pixelFormat;
27
28    virtual SLANG_NO_THROW Result SLANG_MCALL
29    getNativeResourceHandle(InteropHandle* outHandle) override;
30
31    virtual SLANG_NO_THROW Result SLANG_MCALL getSharedHandle(InteropHandle* outHandle) override;
32
33    virtual SLANG_NO_THROW Result SLANG_MCALL setDebugName(const char* name) override;
34};
35
36} // namespace metal
37} // namespace gfx