Im coding terrain to work with a heightmap but when i have a image greater then 1024x1024 it seems to cut the fps to 3 fps(From 75). I have been stuck on this for weeks. I have asked on multiple sites and irc with no response. Im using lwjgl, I think i might need a way to stop rendering terrain at a certain distance, but im not sure. Code: http://pastebin.java-gaming.org/c26a695424f

I know if the terrain is 1024x1024 the 'patches' (for me) are usually around 64 each. (Major Lag for me anyways, my computers a dinosaur)

Make sure that the size of the terrain patches are all possible for ^2 (so 8, 16, 32, 64, etc).Might be why this is occurring, didn't bother to look at the source code yet XD

If it's performance issues.Try implementing a LOD calculator (Level Of Detail).I can't find a link for a explication of it so I'll put a brief description of it here

Quote

Basically it's a 'quality calculator'.The further the camera is away from the terrain patch the lower 'patches inside patches' that will occur.It makes a terrain patch that is far from you: render as 1 patch composed of 1 static geometry, instead of rendering as 1 patch composed of many static geometry's (High Texture Quality).

Note: If a LOD specialist comes along and finds this brief description wrong, this is from my own observations XD.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org