mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-04 20:06:51 +00:00
Fix OpenGL context creation on PowerVR
This commit is contained in:
parent
36bc59f006
commit
b16b67d8b6
@ -286,6 +286,8 @@ public class NativeActivity extends Activity {
|
||||
NativeApp.audioInit();
|
||||
|
||||
mGLSurfaceView = new NativeGLView(this);
|
||||
|
||||
mGLSurfaceView.setEGLContextClientVersion(2);
|
||||
|
||||
// Setup the GLSurface and ask android for the correct
|
||||
// Number of bits for r, g, b, a, depth and stencil components
|
||||
|
@ -10,6 +10,8 @@ import android.util.Log;
|
||||
public class NativeEGLConfigChooser implements EGLConfigChooser {
|
||||
private static final String TAG = "NativeEGLConfigChooser";
|
||||
|
||||
private static final int EGL_OPENGL_ES2_BIT = 4;
|
||||
|
||||
private class ConfigAttribs {
|
||||
EGLConfig config;
|
||||
public int red;
|
||||
@ -68,6 +70,7 @@ public class NativeEGLConfigChooser implements EGLConfigChooser {
|
||||
EGL10.EGL_DEPTH_SIZE, 16,
|
||||
EGL10.EGL_STENCIL_SIZE, 0,
|
||||
EGL10.EGL_SURFACE_TYPE, EGL10.EGL_WINDOW_BIT,
|
||||
EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
|
||||
EGL10.EGL_NONE
|
||||
};
|
||||
|
||||
|
@ -27,7 +27,7 @@ public class NativeGLView extends GLSurfaceView implements SensorEventListener,
|
||||
|
||||
public NativeGLView(NativeActivity activity) {
|
||||
super(activity);
|
||||
setEGLContextClientVersion(2);
|
||||
|
||||
/*
|
||||
if (Build.VERSION.SDK_INT >= 11) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user