mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Content browser
This commit is contained in:
@@ -63,13 +63,20 @@ namespace GlitchyEngine.Renderer
|
||||
name = scope:: String();
|
||||
Path.GetFileNameWithoutExtension(filepath, name);
|
||||
}
|
||||
|
||||
Log.EngineLogger.AssertDebug(!Exists(name), "Can't add two effects with the same name to library.");
|
||||
|
||||
Effect effect = new Effect(filepath, name);
|
||||
Add(effect);
|
||||
if (Exists(name))
|
||||
{
|
||||
return Get(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.EngineLogger.AssertDebug(!Exists(name), "Can't add two effects with the same name to library.");
|
||||
|
||||
return effect;
|
||||
Effect effect = new Effect(filepath, name);
|
||||
Add(effect);
|
||||
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,7 +189,7 @@ namespace GlitchyEngine.Renderer
|
||||
|
||||
for(let entry in _textures)
|
||||
{
|
||||
entry.value.BoundTexture.ReleaseRef();
|
||||
entry.value.BoundTexture.Release();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +199,7 @@ namespace GlitchyEngine.Renderer
|
||||
|
||||
ref TextureEntry entry = ref _textures[name];
|
||||
|
||||
entry.BoundTexture.ReleaseRef();
|
||||
entry.BoundTexture.Release();
|
||||
entry.BoundTexture = texture.GetViewBinding();
|
||||
}
|
||||
|
||||
@@ -205,7 +212,7 @@ namespace GlitchyEngine.Renderer
|
||||
|
||||
ref TextureEntry entry = ref _textures[name];
|
||||
|
||||
entry.BoundTexture.ReleaseRef();
|
||||
entry.BoundTexture.Release();
|
||||
//entry.BoundTexture = .RenderTargetGroup(renderTargetGroup..AddRef(), firstTarget, targetCount);
|
||||
entry.BoundTexture = renderTargetGroup.GetViewBinding(firstTarget);
|
||||
}
|
||||
@@ -216,7 +223,7 @@ namespace GlitchyEngine.Renderer
|
||||
|
||||
ref TextureEntry entry = ref _textures[name];
|
||||
|
||||
entry.BoundTexture.ReleaseRef();
|
||||
entry.BoundTexture.Release();
|
||||
entry.BoundTexture = textureViewBinding..AddRef();
|
||||
}
|
||||
|
||||
@@ -226,11 +233,11 @@ namespace GlitchyEngine.Renderer
|
||||
|
||||
for(let (name, entry) in _textures)
|
||||
{
|
||||
entry.VsSlot?.BoundTexture.ReleaseRef();
|
||||
entry.VsSlot?.BoundTexture.Release();
|
||||
entry.VsSlot?.BoundTexture = entry.BoundTexture;
|
||||
entry.VsSlot?.BoundTexture.AddRef();
|
||||
|
||||
entry.PsSlot?.BoundTexture.ReleaseRef();
|
||||
entry.PsSlot?.BoundTexture.Release();
|
||||
entry.PsSlot?.BoundTexture = entry.BoundTexture;
|
||||
entry.PsSlot?.BoundTexture.AddRef();
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace GlitchyEngine.Renderer
|
||||
{
|
||||
for(let (name, texture) in _textures)
|
||||
{
|
||||
texture.ReleaseRef();
|
||||
texture.Release();
|
||||
}
|
||||
|
||||
delete _textures;
|
||||
@@ -90,7 +90,7 @@ namespace GlitchyEngine.Renderer
|
||||
{
|
||||
if(_textures.TryGetValue(name, var entry))
|
||||
{
|
||||
entry.ReleaseRef();
|
||||
entry.Release();
|
||||
_textures[name] = texture.GetViewBinding();
|
||||
//texture?.AddRef();
|
||||
}
|
||||
|
||||
@@ -34,7 +34,9 @@ namespace GlitchyEngine.Renderer
|
||||
_rendererAPI.Init();
|
||||
}
|
||||
|
||||
[Inline]
|
||||
// REPORT!!!!!!!!!
|
||||
// Inline doesn't compile
|
||||
//[Inline]
|
||||
public static void Clear(RenderTarget2D renderTarget, ColorRGBA color)
|
||||
{
|
||||
_rendererAPI.Clear(renderTarget, color);
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace GlitchyEngine.Renderer
|
||||
for(let entry in entries)
|
||||
{
|
||||
delete entry.Name;
|
||||
entry.BoundTexture.ReleaseRef();
|
||||
entry.BoundTexture.Release();
|
||||
}
|
||||
|
||||
delete entries;
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace GlitchyEngine.Renderer
|
||||
public extern bool IsEmpty { get; }
|
||||
|
||||
public extern void AddRef();
|
||||
public extern void ReleaseRef();
|
||||
public extern void Release();
|
||||
|
||||
public void Dispose() => ReleaseRef();
|
||||
public void Dispose() => Release();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user