mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Removed Bind from Texture
This commit is contained in:
@@ -20,13 +20,6 @@ namespace GlitchyEngine.Renderer
|
|||||||
{
|
{
|
||||||
protected internal ID3D11ShaderResourceView* nativeResourceView ~ _?.Release();
|
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.
|
/** \brief Loads the texture from the specified path.
|
||||||
* @param path The path of the texture to load.
|
* @param path The path of the texture to load.
|
||||||
* @param texture The reference to the pointer that will hold the texture.
|
* @param texture The reference to the pointer that will hold the texture.
|
||||||
|
|||||||
@@ -29,16 +29,6 @@ namespace GlitchyEngine.Renderer
|
|||||||
public abstract uint32 Depth {get;}
|
public abstract uint32 Depth {get;}
|
||||||
public abstract uint32 ArraySize {get;}
|
public abstract uint32 ArraySize {get;}
|
||||||
public abstract uint32 MipLevels {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
|
public struct Texture2DDesc
|
||||||
|
|||||||
Reference in New Issue
Block a user