Added Compile-methods to renderpipeline
This commit is contained in:
parent
58c5bafa1b
commit
eb8e1c639f
3 changed files with 37 additions and 5 deletions
|
|
@ -75,14 +75,39 @@ namespace SM.Base.Window
|
|||
/// </summary>
|
||||
public virtual void Resize()
|
||||
{
|
||||
if (Framebuffers == null) return;
|
||||
Recompile();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Compiles the framebuffers.
|
||||
/// </summary>
|
||||
public void Compile()
|
||||
{
|
||||
foreach (var framebuffer in Framebuffers)
|
||||
framebuffer.Dispose();
|
||||
framebuffer.Compile();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recompiles the pipeline.
|
||||
/// </summary>
|
||||
public void Recompile()
|
||||
{
|
||||
if (Framebuffers == null) return;
|
||||
Dispose();
|
||||
|
||||
Thread.Sleep(100);
|
||||
|
||||
Compile();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disposes unmanaged resources like Framebuffers.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
foreach (var framebuffer in Framebuffers)
|
||||
framebuffer.Compile();
|
||||
framebuffer.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue