www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Minigame on January 13, 2013, 02:26:31 am

Title: blurred text upon resize?
Post by: Minigame on January 13, 2013, 02:26:31 am
(http://i.troll.ws/7d258c5b.png)

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

Here's the bit of code I am using for this feature:
Code: [Select]
// 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..
(http://i.troll.ws/a503703e.png)
Title: Re: blurred text upon resize?
Post by: 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 (http://jpct.de/download/beta/jpct.jar)
Title: Re: blurred text upon resize?
Post by: Minigame on January 13, 2013, 07:19:52 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 (http://jpct.de/download/beta/jpct.jar)

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