hello,
i tried to use the texturerender this way:
tex is a TextureRenderer
texdata is a premade TextureData to be used as background image
if (tex == null) {
tex = new TextureRenderer(256,256,true);
tex.getTexture().updateImage(texdata);
}
Graphics2D g2d = tex.createGraphics();
g2d.setColor(Color.BLACK);
g2d.setComposite(AlphaComposite.Src);
g2d.setFont(new Font("verdana",Font.PLAIN,12));
g2d.drawString(text, 100,100);
g2d.dispose();
tex.sync(0, 0, 256, 256);
rendering:
tex.begin3DRendering();
gl.glBegin(GL.GL_QUADS);
gl.glTexCoord2f(0.0f, 0.0f);
gl.glVertex3f(-0.5f, 0.5f, 0);
gl.glTexCoord2f(0.0f, 1.0f);
gl.glVertex3f(-0.5f, -0.5f, 0);
gl.glTexCoord2f(1.0f, 1.0f);
gl.glVertex3f(0.5f, -0.5f, 0);
gl.glTexCoord2f(1.0f, 0.0f);
gl.glVertex3f(0.5f, 0.5f, 0);
gl.glEnd();
tex.end3DRendering();
unfortunately i cant see the font that is written into the texture, only the background image.
is it required to use the texturerender with the beginRendering and endRendering functions?
also, is there a possibility to enable mipmapping for the texture?
thanks!