Hello guys, i have encountered a strange bug with using FullScreen in Applet, the bug appears to be within CopyArea().
What happens visually is that the area that wrong area gets copied, so when im later supposed to draw the image, its been resized and repositioned all wrong.
Ive discovered a way to make it work in theory using the openGL code for copyArea, but its not practical to use.
Code:
int format = SGL.GL_RGBA;
wormBodyImage.bind();
GL.glCopyTexImage2D(SGL.GL_TEXTURE_2D, 0, format, (int)(map.getGameArea().getMinX()*1.5),(int) (map.getGameArea().getMinY()*1.5)+181, (int) (wormBodyImage.getTexture()
.getTextureWidth()*1.5), (int)(wormBodyImage.getTexture().getTextureHeight()*1.5), 0);
wormBodyImage.ensureInverted();
In this example i have a canvas thats exacly 50% in width and in height compared to my screen (counting pixels). Because of this, to make copyarea() work. I need to increase the Area i want to copy with 1.5 (50%) in both x and y. Also for some reason, i need to add 181 to the Y-value since the applet creates a 181 extra pixels in the bottom of the screen.
Anyhow, something is not working great with copyArea().
The main reason that i can think about is that an Applet doesn´t resize the same way in fullscreen as an Application.
If you want and need it, i can post some pictures and try to describe better.
Thx in advance!!