Permalink
Browse files

front: Log the version of the GLES context that was created.

According to Android documentation, the device will always create the
highest possible GLES context that it supports.  So even if SDL requests
a 2.0 context, an NVIDIA Shield (for example) will produce a 3.1
context.  Thus we don't need to explicitly request a 3.1 context.

We log the created version here, as proof that the highest supported
context was created.
  • Loading branch information...
littleguy77 committed May 21, 2015
1 parent 6737371 commit a188bbe66bcc233c36685bd65038021db0f74fd5
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/paulscode/android/mupen64plusae/game/GameSurface.java
@@ -27,6 +27,7 @@
import javax.microedition.khronos.egl.EGLSurface;
import android.content.Context;
import android.opengl.GLES10;
import android.util.AttributeSet;
import android.util.Log;
import android.view.SurfaceView;
@@ -181,6 +182,8 @@ public boolean createGLContext( int majorVersion, int minorVersion, int[] config
{
if( bindEGLContext() )
{
String version = GLES10.glGetString( GLES10.GL_VERSION );
Log.i( TAG, "Created GL context " + version );
return true;
}
unbindEGLContext();

1 comment on commit a188bbe

@littleguy77

This comment has been minimized.

Show comment
Hide comment
@littleguy77

littleguy77 May 21, 2015

Member

@Gillou68310 Looks like we get a GLES 3.x context automatically, even if only a GLES 2.0 context is requested. That's nice, because it means we don't have to modify any of the SDL2, mupen64plus-core, or ae-bridge code. It wouldn't surprise me if some of the device drivers don't follow spec (I'm looking at you Qualcomm), so we may need to keep a lookout for that. But for the time being it's nice we don't have to muck with upstream stuff.

I posted on the paulscode forum, but just to let you know, I heavily rebased the gliden64-integration branch and renamed the original (so we don't lose the comments or break public record).

Member

littleguy77 commented on a188bbe May 21, 2015

@Gillou68310 Looks like we get a GLES 3.x context automatically, even if only a GLES 2.0 context is requested. That's nice, because it means we don't have to modify any of the SDL2, mupen64plus-core, or ae-bridge code. It wouldn't surprise me if some of the device drivers don't follow spec (I'm looking at you Qualcomm), so we may need to keep a lookout for that. But for the time being it's nice we don't have to muck with upstream stuff.

I posted on the paulscode forum, but just to let you know, I heavily rebased the gliden64-integration branch and renamed the original (so we don't lose the comments or break public record).

Please sign in to comment.