We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have some problems with FX2D.
It's a great renderer and its snapy as hell but some functions won't work.
The biggest problem I have is that 'smooth' and 'noSmooth' hase no effect.
In my code I scale an image for the background, it's for a 8 bit style game, but because of the anti aliasing it looks like shit.
Also it seems like the mouseWheel function doesn't works, thats weard to.
Has any body found a work around for theese problems?
It would be nice to be able to use FX2D for that because the framerate compared to the other renderers is just impressiv.
Answers
That did not work... Thats better:
Drawing things outside the standard draw thread is usually a bad idea
With the default renderer it works but it is thery slow and the 'drawThread' gets called from the draw as a separate thread to improve performance, in theory....
How big is the screen?
if you have a 16x16 images and always print it at 10 x the size, and hate the bicubic interpolation then maybe make your image 160x160 and don't scale.
and why call background() if you go on to tile the entire screen?
with P2D you can call
and that'll force linear scaling on the image.
I have allready made about 50 textures. I know that you can do it that way but it doesn't work with fx2d and p2d is to slow. Maybe I can Try to virtually display the images and then read every Pixel and copy it multiple times in a return image that would be scaled to the start image by a integer factor..... Would be slow to..... Damm
It doesn't work because fx2d is not based on open gl but still uses the gpu for that stuff. It isn't blooded like opengl. The code sniped you posted controlles opengl...
seems like you've already decided on fx2d
but with opengl you could do that tiling (with linear scaling) with one quad (using non-unit texture coords), and not have to loop at all.
my laptop reports 900 fps with the above code using opengl. this is probably enough for anyone. (that said, i don't trust the fps reporting with the threading going on. it's reporting figures above 1000 for fx2d despite you capping it at 1000)
Possibly related? There is currently an open issue on
noSmooth()
for P2D as well:It reported about 900 fps to me to but it is not even near that. Restarting the code sometimes gives about 40 fps. That seems to be pretty accurate because of the obvious stuttering when scrolling through the tiles. Im not shure what you mean with quads. I usually don't use opengl much because I often use Java 2d for easy 2d stuff