Java 光滑2D中带抽绳的模糊文本

Java 光滑2D中带抽绳的模糊文本,java,slick2d,Java,Slick2d,我的光滑2d游戏没有渲染graphics.drawString(),我有一个非常严重的问题 除非我在全屏模式下 屏幕截图: 这是我到目前为止的代码(基本上只是“简单游戏”教程) 声明: public Font font; public TrueTypeFont trueTypeFont; @Override public void init(GameContainer gc) throws SlickException { font = new Font("Verd

我的光滑2d游戏没有渲染
graphics.drawString(),我有一个非常严重的问题
除非我在全屏模式下

屏幕截图

这是我到目前为止的代码(基本上只是“简单游戏”教程)

声明

public Font font;
public TrueTypeFont trueTypeFont;
@Override
public void init(GameContainer gc) 
        throws SlickException {
    font = new Font("Verdana", Font.BOLD, 20);
    trueTypeFont = new TrueTypeFont(font, true);

}
public void render(GameContainer gc, Graphics g) 
        throws SlickException 
{
    // render some text to the screen
    trueTypeFont.drawString(20.0f, 20.0f, "Slick displaying True Type Fonts", Color.green);
    g.drawString("Hello", 300,300);
}
init

public Font font;
public TrueTypeFont trueTypeFont;
@Override
public void init(GameContainer gc) 
        throws SlickException {
    font = new Font("Verdana", Font.BOLD, 20);
    trueTypeFont = new TrueTypeFont(font, true);

}
public void render(GameContainer gc, Graphics g) 
        throws SlickException 
{
    // render some text to the screen
    trueTypeFont.drawString(20.0f, 20.0f, "Slick displaying True Type Fonts", Color.green);
    g.drawString("Hello", 300,300);
}
渲染

public Font font;
public TrueTypeFont trueTypeFont;
@Override
public void init(GameContainer gc) 
        throws SlickException {
    font = new Font("Verdana", Font.BOLD, 20);
    trueTypeFont = new TrueTypeFont(font, true);

}
public void render(GameContainer gc, Graphics g) 
        throws SlickException 
{
    // render some text to the screen
    trueTypeFont.drawString(20.0f, 20.0f, "Slick displaying True Type Fonts", Color.green);
    g.drawString("Hello", 300,300);
}
我尝试将VSync设置为true,并手动限制帧速率。但是没有,没有变化


知道为什么会这样吗?它在全屏模式下完美地呈现文本。

EDIT:事实上,在非全屏模式下,所有图形都会损坏。即使是简单绘制的图像也是如此。