android - Background transparency in libgdx -


how can make background of screen transparent if use libgdx in android?

the code tried use doesn't work.

gdx.gl.glclearcolor( 0, 0, 0, 0 ); gdx.gl.glclear( gl10.gl_color_buffer_bit | gl10.gl_depth_buffer_bit ); 

just found solution!

just add code class extends androidapplication.

androidapplicationconfiguration cfg = new androidapplicationconfiguration(); cfg.r = cfg.g = cfg.b = cfg.a = 8;  cfg.usegl20 = false;  view view = initializeforview(new linedrawing(), cfg);  if (graphics.getview() instanceof surfaceview) {             surfaceview glview = (surfaceview) graphics.getview();             glview.getholder().setformat(pixelformat.translucent);             glview.setzorderontop(true); } 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -