Skip to content

Commit

Permalink
Fixes #64 only first frame rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonIT committed Feb 21, 2021
1 parent 8e069ca commit 74b978f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ allprojects {

ext {
minSdk = 16
targetSdk = 29
compileSdk = 29
buildTools = '29.0.3'
targetSdk = 30
compileSdk = 30
buildTools = '30.0.3'

isReleaseBuild = {
return project.hasProperty("RELEASE")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public boolean update () {
shader.bind();

Gdx.gl.glActiveTexture(GL20.GL_TEXTURE0);
Gdx.gl.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, textures[0]);
Gdx.gl.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, getTextureExternal());
shader.setUniformi("u_sampler0", 0);
renderer.begin(transform, GL20.GL_TRIANGLE_STRIP);
renderer.texCoord(0, 0);
Expand All @@ -220,7 +220,6 @@ public boolean update () {
renderer.vertex(1, 1, 0);
renderer.end();
fbo.end();
if (frame != null) frame.dispose();
frame = fbo.getColorBufferTexture();
}
return true;
Expand Down Expand Up @@ -293,7 +292,6 @@ public void dispose () {
GLES20.glDeleteTextures(1, textures, 0);

if (fbo != null) fbo.dispose();
if (frame != null) frame.dispose();
shader.dispose();
renderer.dispose();
}
Expand Down

0 comments on commit 74b978f

Please sign in to comment.