Log in or register to post comments

Samples - Books - Remove black background

November 13, 2016 - 10:59pm #1

Hi All

I have been working on the Books sample java app and I am trying to have a transparent background without success.

My plan is to use a modified thumb image (3d looking with shadows drawn) on its own without the black background. I removed the background.png image however the rendered layer is stil black. How can I make the layer transparent?

Thanks in advance

Samples - Books - Remove black background

November 16, 2016 - 4:08am #2

Solved

1. put this line of code in BooksRenderer.java renderFrame method

GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA); 

Note: Place above line of code below the following code

GLES20.glEnable(GLES20.GL_BLEND);

2. and put

GLES20.glDisable(GLES20.GL_BLEND);

Note: Place above line of code before the following code

Renderer.getInstance().end();

 

Log in or register to post comments