Search code examples
javaopenglrenderlwjgl

Rendering issues using LWJGL


enter image description here

In the picture I have rendered my terrain with a few basic models (tree + shrub), but I had been noticing some glitching that was occuring with the models. Knowing this, I rendered a flat plane of "water" onto my world and it showed what I had thought. I am still unsure of what is wrong here, any insight would be helpful!

Note: I am using LWJGL The plane of "water" is flat, and the area that it is in is concave, so no part of it sticks above the "water"


Solution

  • FIXED: This is the result of having too small of a zNear value when calculating projection method. If you dont know what that is, search up how to create a projection matrix 3d and it will explain :) Finally solved it and can get moving with my game, hope this can help others!