I have a need to do overlay (ortho) text whose color can be modified. What i've been using works for all colors except black. I've tried searching for info, but the only references are from 2003/4, so I'm a bit suspect.
I tried this in TestText.java and can't get it to work in that simple example.
AlphaState as = display.getRenderer().createAlphaState();
as.setBlendEnabled(true);
as.setSrcFunction(AlphaState.SB_SRC_ALPHA);
as.setDstFunction(AlphaState.DB_ONE);
as.setTestEnabled(true);
as.setTestFunction(AlphaState.TF_GREATER);
as.setEnabled(true);
TextureState ts = display.getRenderer().createTextureState();
ts.setTexture(
TextureManager.loadTexture(
TestText.class.getClassLoader().getResource(Text.DEFAULT_FONT),
Texture.MM_LINEAR,
Texture.FM_LINEAR));
ts.setEnabled(true);
text = new Text("text", "Testing Text! Look, symbols: <>?!^&*_");
text.setLocalTranslation(new Vector3f(1,60,0));
ADDED --> text.setTextColor(ColorRGBA.black); <
ADDED
text.setRenderState(ts);
text.setRenderState(as);
and then the usual.
This has got to be something real simple that I am missing. I'm using the standard font, BTW.
Hey, while we're on that subject, is there a tool out there that will automagically generate a jME-compatible font texture?
Thanks folks, I just plain give up after 4 hours one issue! :(
Joe