mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
Added some functionality for plugins that want to render in other editing modes
This commit is contained in:
parent
6a685b7678
commit
603cdbf042
6 changed files with 12 additions and 0 deletions
|
@ -102,6 +102,9 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Panning
|
||||
public bool IsPanning { get { return panning; } }
|
||||
|
||||
// Rendering
|
||||
public IRenderer2D Renderer { get { return renderer; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
|
|
@ -322,6 +322,7 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
// Rendering events
|
||||
public virtual void OnEditRedrawDisplayBegin() { }
|
||||
public virtual void OnEditRedrawDisplayEnd() { }
|
||||
public virtual void OnPresentDisplayBegin() { }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -300,6 +300,7 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
public void OnEditMouseInput(Vector2D delta) { foreach(Plugin p in plugins) p.Plug.OnEditMouseInput(delta); }
|
||||
public void OnEditRedrawDisplayBegin() { foreach(Plugin p in plugins) p.Plug.OnEditRedrawDisplayBegin(); }
|
||||
public void OnEditRedrawDisplayEnd() { foreach(Plugin p in plugins) p.Plug.OnEditRedrawDisplayEnd(); }
|
||||
public void OnPresentDisplayBegin() { foreach(Plugin p in plugins) p.Plug.OnPresentDisplayBegin(); }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -202,6 +202,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
// This draws the image on screen
|
||||
public void Present()
|
||||
{
|
||||
General.Plugins.OnPresentDisplayBegin();
|
||||
|
||||
// Start drawing
|
||||
if(graphics.StartRendering(true, General.Colors.Background.ToColorValue(), graphics.BackBuffer, graphics.DepthBuffer))
|
||||
{
|
||||
|
|
|
@ -767,6 +767,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
// This finishes rendering
|
||||
public void Finish()
|
||||
{
|
||||
General.Plugins.OnPresentDisplayBegin();
|
||||
|
||||
// Done
|
||||
graphics.FinishRendering();
|
||||
graphics.Present();
|
||||
|
|
|
@ -86,6 +86,9 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
public bool ProcessGeometry { get { return processgeometry; } set { processgeometry = value; } }
|
||||
public bool ProcessThings { get { return processthings; } set { processthings = value; } }
|
||||
public VisualBlockMap BlockMap { get { return blockmap; } }
|
||||
|
||||
// Rendering
|
||||
public IRenderer3D Renderer { get { return renderer; } }
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
Loading…
Reference in a new issue