mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-06 05:01:53 +00:00
Crappy hot reloading of textures and Properties editor for textures
This commit is contained in:
@@ -125,6 +125,17 @@ namespace GlitchyEngine.Renderer
|
||||
{
|
||||
return .(_nativeResourceView, _samplerState.nativeSamplerState);
|
||||
}
|
||||
|
||||
protected override void PlatformSneakySwappyTexture(RenderTarget2D otherTexture)
|
||||
{
|
||||
Swap!(_description, otherTexture._description);
|
||||
|
||||
// Consider sneaky swapping _depthStencilTarget too...
|
||||
Swap!(_depthStenilTarget, otherTexture._depthStenilTarget);
|
||||
|
||||
Swap!(_nativeTexture, otherTexture._nativeTexture);
|
||||
Swap!(_nativeRenderTargetView, otherTexture._nativeRenderTargetView);
|
||||
}
|
||||
}
|
||||
|
||||
extension RenderTargetFormat
|
||||
|
||||
@@ -261,6 +261,13 @@ namespace GlitchyEngine.Renderer
|
||||
{
|
||||
return .(_nativeResourceView, _samplerState?.nativeSamplerState);
|
||||
}
|
||||
|
||||
protected override void PlatformSneakySwappyTexture(Texture2D otherTexture)
|
||||
{
|
||||
Swap!(nativeDesc, otherTexture.nativeDesc);
|
||||
Swap!(nativeTexture, otherTexture.nativeTexture);
|
||||
Swap!(_nativeResourceView, otherTexture._nativeResourceView);
|
||||
}
|
||||
}
|
||||
|
||||
extension TextureCube
|
||||
|
||||
Reference in New Issue
Block a user