opengl es - Fonts created in Hiero can't set the color with new Color(r,g,b,a); - LIBGDX -
i generated fonts in hiero. if set font color :
fontfps.setcolor(color.yellow);
the text color drawn correctly.
but if set
color fpscolor = new color(74f, 112f, 139f, 160f); fontfps.setcolor(fpscolor);
then white color no alpha. problem?
first of float values within method should 0f 1f. color should (values set in constructor calculated dividing original values 255)
color fpscolor = new color(0.29f, 0.43f, 0.54f, 0.66f);
also should enable blending (i'm not sure if did that)
gdx.gl.glenable(gl10.gl_blend); gdx.gl.glblendfunc(gl10.gl_src_alpha, gl10.gl_one_minus_src_alpha)
opengl-es libgdx
No comments:
Post a Comment