2016-07-12 5 views
0

私はこのエラーの参照を見ましたが、解決策はありませんでした。Slick2d drawstringはボックスを描画しますが、テキストはありません

テキストを描画する場合、指定された色の実線ボックスのみが描画されます。

コードは次のようである:

TrueTypeFont font; 
    Font awtFont = new Font("Arial Unicode MS", Font.BOLD, 12); //name, style (PLAIN, BOLD, or ITALIC), size 
    font = new TrueTypeFont(awtFont, true); //base Font, anti-aliasing true/false 

    while (!Display.isCloseRequested()) { 
     render(); 

     font.drawString(10, 10, "ABC123", Color.black); //x, y, string to draw, color 

答えて

0
//ENABLE THESE: 

glEnable(GL_BLEND); 
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 


//RENDER LIKE THIS: 

glPushMatrix(); 
bodyPosition = body.getPosition().mul(30); 
glTranslatef(Position.x, Position.y, 0); 
GL11.glDisable(GL11.GL_TEXTURE_2D); 
glPopMatrix(); 
関連する問題