1
0
mirror of synced 2024-11-12 10:10:50 +01:00

More viewport fixes

This commit is contained in:
KillzXGaming 2019-04-25 17:25:40 -04:00
parent 812fe2e6b5
commit 208fffa7f9
5 changed files with 13 additions and 0 deletions

Binary file not shown.

View File

@ -41,6 +41,12 @@ namespace FirstPlugin.Forms
if (viewport != null)
OnLoadedTab();
else
{
viewport = new Viewport();
viewport.Dock = DockStyle.Fill;
OnLoadedTab();
}
}
else
{
@ -142,6 +148,7 @@ namespace FirstPlugin.Forms
public bool IsLoaded = false;
List<AbstractGlDrawable> Drawables;
public void LoadViewport(List<AbstractGlDrawable> drawables, List<ToolStripMenuItem> customContextMenus = null)
@ -165,7 +172,10 @@ namespace FirstPlugin.Forms
Drawables.Add(draw);
if (!Runtime.UseOpenGL || !Runtime.DisplayViewport)
{
IsLoaded = false;
return;
}
if (!viewport.scene.staticObjects.Contains(draw) &&
!viewport.scene.objects.Contains(draw))
@ -179,7 +189,10 @@ namespace FirstPlugin.Forms
Drawables.Remove(draw);
if (!Runtime.UseOpenGL || !Runtime.DisplayViewport)
{
IsLoaded = false;
return;
}
viewport.RemoveDrawable(draw);
}