Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init EGL #1584

Merged
merged 1 commit into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions MonoGame.Framework/Platform/Cardboard/AndroidSurfaceView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@ void ProcessStateResumed()
// do not run game if surface is not available
if (_isAndroidSurfaceAvailable)
{
if (OGL_DROID.Current == null)
OGL_DROID.Initialize();

var adapter = ((IPlatformGraphicsAdapter)GraphicsAdapter.DefaultAdapter).Strategy.ToConcrete<ConcreteGraphicsAdapter>();
var GL = adapter.Ogl;

Expand Down Expand Up @@ -310,7 +307,7 @@ protected void CreateGLSurface()
var GL = adapter.Ogl;

/* Cardboard: Surface was created by GLSurfaceView.
_eglSurface = GL.Egl.EglCreateWindowSurface(_eglDisplay, _eglConfig, (Java.Lang.Object)this.Holder, null);
_eglSurface = GL.Egl.EglCreateWindowSurface(adapter.EglDisplay, _eglConfig, (Java.Lang.Object)this.Holder, null);
if (_eglSurface == EGL10.EglNoSurface)
_eglSurface = null;
if (_eglSurface == null)
Expand All @@ -332,7 +329,7 @@ private void MakeCurrentGLContext()
var GL = adapter.Ogl;

/* Cardboard: Surface was created by GLSurfaceView.
if (!GL.Egl.EglMakeCurrent(_eglDisplay, _eglSurface, _eglSurface, _eglContext))
if (!GL.Egl.EglMakeCurrent(adapter.EglDisplay, _eglSurface, _eglSurface, _eglContext))
throw new Exception("Could not make EGL current" + GL.GetEglErrorAsString());
*/
}
Expand Down
Loading