Fixed few problems with render pipeline.
This commit is contained in:
parent
e24f7ebfb9
commit
a9c53a1e52
5 changed files with 19 additions and 45 deletions
|
|
@ -53,9 +53,10 @@ namespace SM.Base.Window
|
|||
/// <inheritdoc/>
|
||||
public virtual void Initialization()
|
||||
{
|
||||
MainFramebuffer.Name = GetType().Name + ".MainFramebuffer";
|
||||
|
||||
if (MainFramebuffer != null) Framebuffers.Add(MainFramebuffer);
|
||||
if (MainFramebuffer != null) {
|
||||
Framebuffers.Add(MainFramebuffer);
|
||||
MainFramebuffer.Name = GetType().Name + ".MainFramebuffer";
|
||||
}
|
||||
DefaultShader ??= SMRenderer.DefaultMaterialShader;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using SM.Base.Shaders;
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
using SM.Base.Shaders;
|
||||
using SM.Base.Window;
|
||||
using SM.OGL.Framebuffer;
|
||||
using SM2D.Shader;
|
||||
|
||||
namespace SM2D.Pipelines
|
||||
|
|
@ -12,7 +14,8 @@ namespace SM2D.Pipelines
|
|||
/// <summary>
|
||||
/// The access to the pipeline.
|
||||
/// </summary>
|
||||
public static Basic2DPipeline Pipeline = new Basic2DPipeline();
|
||||
public static Basic2DPipeline Pipeline =
|
||||
new Basic2DPipeline();
|
||||
|
||||
/// <inheritdoc />
|
||||
public override MaterialShader DefaultShader { get; protected set; } = ShaderCollection.Instanced;
|
||||
|
|
@ -22,6 +25,8 @@ namespace SM2D.Pipelines
|
|||
/// <inheritdoc />
|
||||
protected override void RenderProcess(ref DrawContext context)
|
||||
{
|
||||
Framebuffer.Screen.Activate(FramebufferTarget.Framebuffer, ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
|
||||
|
||||
context.Scene?.Draw(context);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,5 +35,4 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.0.1.1")]
|
||||
Loading…
Add table
Add a link
Reference in a new issue