Skip to content

Commit

Permalink
Update ShadowGLSurfaceView.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Devashishbasu committed Feb 27, 2024
1 parent e55f5c5 commit 9c5157b
Showing 1 changed file with 1 addition and 28 deletions.
Expand Up @@ -22,33 +22,6 @@ public void callOnDetachedFromWindow() {
glThread.interrupt();
glThread = null;
}
}

@Implementation
protected void onResume() {
if (renderer != null) {
glThread = new Thread(new Runnable() {
@Override
public void run() {
renderer.onSurfaceCreated(null, null);
renderer.onSurfaceChanged(null, 0, 0);
while (!Thread.interrupted()) {
renderer.onDrawFrame(null);
}
}
});
glThread.start();
}
}

// Method to set the renderer
public void setRenderer(GLSurfaceView.Renderer renderer) {
this.renderer = renderer;
}

// Resetter method to terminate the GL thread
@Resetter
public static void reset() {
// Perform cleanup tasks if any
super.callOnDetachedFromWindow();
}
}

0 comments on commit 9c5157b

Please sign in to comment.