Applied Textures are Blurring

Started by Tale, December 26, 2009, 09:44:58 PM

Previous topic - Next topic

Tale

I have been doing some tests with jpct before applying it to one of my games and have ran into a problem.  During my games I will often times have windows displayed and have been trying to create these using a plane with a textured image.  The problem is that the texture becomes very pixelated if I zoom in on the window.  Even if my camera is far away, parts of the texture are slightly out of order.

Is there a way to prevent this or is there a better way to display my game windows?

Thanks for any help that is provided.

(Also, I am limited to the software renderer.)

EgonOlsen

Maybe blitting them is an option (FrameBuffer has some blit()-methods)? That way, they'll have the same size as your bitmap has. That will prevent any pixels from going crazy but you can't scale them of course.

Tale


Tale

That cleared up the blurring, but I seem to be restricted to a set region that my image is squeezed to fit.  Am I able to turn this region off or change its size?

I also noticed that I can get the graphics from the buffer.  Would it be just as effective to use the Java built-in Draw methods using the graphics that I get from the buffer to draw my images?

EgonOlsen

Blitting works with textures which are limited to a power of 2. That is of course a restriction. If you are sure, that you'll never want to or have to switch to the hardware renderer and that you don't need Java 1.1 compatibility, then you can work with the graphics-instance that the frame buffer provides to draw your own stuff using Java2D. You can even use Swing or AWT instead. However, once you decide to take the OpenGL-route instead, you'll get stuck...

Tale