From 92fd8bb572f36f3db8793f29aeae49a8737f54d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20L=C3=BCbe=C3=9F?= Date: Sun, 27 Feb 2022 12:30:09 +0100 Subject: [PATCH] Removed Bind from Texture --- .../src/Platform/DX11/Renderer/Dx11Texture.bf | 7 ------- GlitchyEngine/src/Renderer/Texture.bf | 10 ---------- 2 files changed, 17 deletions(-) diff --git a/GlitchyEngine/src/Platform/DX11/Renderer/Dx11Texture.bf b/GlitchyEngine/src/Platform/DX11/Renderer/Dx11Texture.bf index 0c4719b..380642b 100644 --- a/GlitchyEngine/src/Platform/DX11/Renderer/Dx11Texture.bf +++ b/GlitchyEngine/src/Platform/DX11/Renderer/Dx11Texture.bf @@ -20,13 +20,6 @@ namespace GlitchyEngine.Renderer { protected internal ID3D11ShaderResourceView* nativeResourceView ~ _?.Release(); - protected override void ImplBind(uint32 slot) - { - // TODO: textures don't bind themselves! - NativeContext.VertexShader.SetShaderResources(slot, 1, &nativeResourceView); - NativeContext.PixelShader.SetShaderResources(slot, 1, &nativeResourceView); - } - /** \brief Loads the texture from the specified path. * @param path The path of the texture to load. * @param texture The reference to the pointer that will hold the texture. diff --git a/GlitchyEngine/src/Renderer/Texture.bf b/GlitchyEngine/src/Renderer/Texture.bf index d18d9d8..0b2e7ac 100644 --- a/GlitchyEngine/src/Renderer/Texture.bf +++ b/GlitchyEngine/src/Renderer/Texture.bf @@ -29,16 +29,6 @@ namespace GlitchyEngine.Renderer public abstract uint32 Depth {get;} public abstract uint32 ArraySize {get;} public abstract uint32 MipLevels {get;} - - public void Bind(uint32 slot = 0) - { - ImplBind(slot); - - if(_samplerState != null) - _samplerState.Bind(slot); - } - - protected extern void ImplBind(uint32 slot); } public struct Texture2DDesc