1
0
mirror of synced 2024-12-01 02:27:22 +01:00

Some fixes for opening bfres without opengl enabled

This commit is contained in:
KillzXGaming 2020-06-17 16:29:03 -04:00
parent 0aaf6b97a3
commit ee58bfcadb

View File

@ -99,11 +99,14 @@ namespace FirstPlugin.Forms
stTabControl2.myBackColor = FormThemes.BaseTheme.FormBackColor;
//Always create an instance of the viewport unless opengl is disabled
if (viewport == null && Runtime.UseOpenGL || viewport.IsDisposed && Runtime.UseOpenGL)
if (Runtime.UseOpenGL)
{
viewport = new Viewport(ObjectEditor.GetDrawableContainers());
viewport.Dock = DockStyle.Fill;
viewport.DisplayAll = DisplayAll;
if (viewport == null || (viewport != null && viewport.IsDisposed))
{
viewport = new Viewport(ObjectEditor.GetDrawableContainers());
viewport.Dock = DockStyle.Fill;
viewport.DisplayAll = DisplayAll;
}
}
//If the option is enabled by settings, and it has models display the viewport