fix opengl build

This commit is contained in:
UnknownShadow200 2018-07-12 03:23:17 +10:00
parent 5a6747084b
commit aff169862f
3 changed files with 3 additions and 5 deletions

View File

@ -30,7 +30,7 @@ namespace ClassicalSharp {
#if ANDROID #if ANDROID
Graphics = new OpenGLESApi(); Graphics = new OpenGLESApi();
#elif !USE_DX #elif !USE_DX
Graphics = new OpenGLApi(); Graphics = new OpenGLApi(window.WindowInfo);
#else #else
Graphics = new Direct3D9Api(this); Graphics = new Direct3D9Api(this);
#endif #endif

View File

@ -252,9 +252,7 @@ namespace ClassicalSharp {
Gui.OnResize(); Gui.OnResize();
} }
void OnClosed(object sender, EventArgs e) { void OnClosed(object sender, EventArgs e) { isExiting = true; }
Dispose();
}
void OnNewMapCore(object sender, EventArgs e) { void OnNewMapCore(object sender, EventArgs e) {
for (int i = 0; i < Components.Count; i++) for (int i = 0; i < Components.Count; i++)

View File

@ -594,7 +594,7 @@ namespace ClassicalSharp.GraphicsAPI {
public override void OnWindowResize(Game game) { public override void OnWindowResize(Game game) {
GL.Viewport(0, 0, game.Width, game.Height); GL.Viewport(0, 0, game.Width, game.Height);
glContext.Update(game.window); glContext.Update(game.window.WindowInfo);
} }
public override void Dispose() { public override void Dispose() {