|
this code is a sample in my project,i hope this can help u!
textRenderer.begin3DRendering();
textRenderer.setColor(255, 255, 255, 255);
Rectangle2D r2d=textRenderer.getBounds(flatLegendPicInforText);
float scaleFactor=0.0015f;
float textWidth3D=(float) (r2d.getWidth()*scaleFactor);
textRenderer.draw3D(flatLegendPicInforText, x-textWidth3D/2, y,z,scaleFactor);
textRenderer.flush();
textRenderer.end3DRendering();
|