use of com.chrisali.javaflightsim.lwjgl.water.WaterTile in project j6dof-flight-sim by chris-ali.
the class WaterRenderer method render.
public void render(List<WaterTile> water, Camera camera) {
prepareRender(camera);
for (WaterTile tile : water) {
Matrix4f modelMatrix = RenderingUtilities.createTransformationMatrix(new Vector3f(tile.getX(), tile.getHeight(), tile.getZ()), 0, 0, 0, WaterTile.TILE_SIZE);
shader.loadModelMatrix(modelMatrix);
shader.loadFog(fogDensity, fogGradient);
shader.loadSkyColor(MasterRenderer.getSkyColor().x, MasterRenderer.getSkyColor().y, MasterRenderer.getSkyColor().z);
shader.connectTextures();
GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, quad.getVertexCount());
}
unbind();
}