[LibGDX] Draw transparent shapes
Before ShapeRenderer#begin,
Gdx.gl.glEnable(GL10.GL_BLEND);
Gdx.gl.glBlendFunc(GL10.GL_SRC_ALPHA,GL10.GL_ONE_MINUS_SRC_ALPHA);
//start draw
Gdx.gl.glDisable(GL10.GL_BLEND);
Disable it after ShapeRenderer#end.
Written by Hendra Gunawan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Java
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#