blurred text upon resize?

Started by Minigame, January 13, 2013, 02:26:31 AM

Previous topic - Next topic

Minigame



Whenever I resize the client application, it seems that text blurs.

Here's the bit of code I am using for this feature:

// Handle resizing
if (Display.wasResized()) {
buffer.resize(Display.getWidth(), Display.getHeight());
buffer.refresh();
app.getSettings().setWidth(Display.getWidth());
app.getSettings().setHeight(Display.getHeight());
mouseYOffset = buffer.getOutputHeight();
}


To draw the text Strings I am using an implementation of raft's GLFont class, so I figured maybe somebody here has used it and could tell me if  I am doing something wrong?

Updated:
Sometimes when I resize the application I get these random lines? I didn't notice this when I originally posted, but it is relevant to the original post so I shared it on this thread as well..

EgonOlsen

This happened for odd widths/heights only. It was a problem with the way resize() was calculating the framebuffer's center. It should be fixed in this jar: jpct.de/download/beta/jpct.jar

Minigame

Quote from: EgonOlsen on January 13, 2013, 01:06:59 PM
This happened for odd widths/heights only. It was a problem with the way resize() was calculating the framebuffer's center. It should be fixed in this jar: jpct.de/download/beta/jpct.jar

Excellent, it seems to be fine. Thank you very much Egon