Disable EGL initialization, called from native now

This commit is contained in:
mittorn 2016-05-12 22:42:15 +00:00
parent 19c8340b5c
commit 7bcaa0db87

View file

@ -160,6 +160,10 @@ public class XashActivity extends Activity {
mSurface.SwapBuffers(); mSurface.SwapBuffers();
} }
public static Surface getNativeSurface() {
return XashActivity.mSurface.getNativeSurface();
}
public static void vibrate( int time ) { public static void vibrate( int time ) {
((Vibrator) mSingleton.getSystemService(Context.VIBRATOR_SERVICE)).vibrate( time ); ((Vibrator) mSingleton.getSystemService(Context.VIBRATOR_SERVICE)).vibrate( time );
} }
@ -281,12 +285,10 @@ public class XashActivity extends Activity {
class XashMain implements Runnable { class XashMain implements Runnable {
public void run() public void run()
{ {
XashActivity.createGLContext();
XashActivity.nativeInit(XashActivity.mArgv); XashActivity.nativeInit(XashActivity.mArgv);
} }
} }
/** /**
SDLSurface. This is what we draw on, so we need to know when it's created SDLSurface. This is what we draw on, so we need to know when it's created
in order to do anything useful. in order to do anything useful.
@ -360,6 +362,10 @@ View.OnKeyListener {
// unused // unused
public void onDraw(Canvas canvas) {} public void onDraw(Canvas canvas) {}
// first, initialize native backend
public Surface getNativeSurface() {
return getHolder().getSurface();
}
// EGL functions // EGL functions
public boolean InitGL() { public boolean InitGL() {