Some fixes for opening bfres without opengl enabled
This commit is contained in:
parent
0aaf6b97a3
commit
ee58bfcadb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user