mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-17 20:10:12 -07:00
Changes
- Moved all gl4es+egl management into gl_bridge.c and gl_bridge.h - Also, reimplemented it from scratch with surface swapping support
This commit is contained in:
parent
424e6bb630
commit
1261e4a7ea
5 changed files with 246 additions and 53 deletions
|
|
@ -143,7 +143,10 @@ public class MinecraftGLSurface extends View {
|
|||
private boolean isCalled = false;
|
||||
@Override
|
||||
public void surfaceCreated(@NonNull SurfaceHolder holder) {
|
||||
if(isCalled) return;
|
||||
if(isCalled) {
|
||||
JREUtils.setupBridgeWindow(surfaceView.getHolder().getSurface());
|
||||
return;
|
||||
}
|
||||
isCalled = true;
|
||||
|
||||
realStart(surfaceView.getHolder().getSurface());
|
||||
|
|
@ -168,7 +171,10 @@ public class MinecraftGLSurface extends View {
|
|||
private boolean isCalled = false;
|
||||
@Override
|
||||
public void onSurfaceTextureAvailable(@NonNull SurfaceTexture surface, int width, int height) {
|
||||
if(isCalled) return;
|
||||
if(isCalled) {
|
||||
JREUtils.setupBridgeWindow(new Surface(surface));
|
||||
return;
|
||||
}
|
||||
isCalled = true;
|
||||
|
||||
realStart(new Surface(textureView.getSurfaceTexture()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue