示例#1
0
        private static void RenderAllWithoutWater(BeginMode mode, Matrix4 worldMatrix, Matrix4 projectionMatrix, Matrix4 viewMatrix, float[] clipPlaneEq)
        {
            GL.Disable(EnableCap.DepthTest);
            {
                Matrix4 mat        = Matrix4.CreateTranslation(_camera.CameraPosition);
                var     tempMatrix = Matrix4.Mult(mat, viewMatrix);

                _cubeMap.Render(mode, worldMatrix, projectionMatrix, tempMatrix, UIInputData.IsCubeMapOn, clipPlaneEq);
            }
            GL.Enable(EnableCap.DepthTest);

            _woodenChest.Render(mode, worldMatrix, projectionMatrix, viewMatrix, UIInputData.IsWoodenChestOn);

            _terrain.Render(mode, worldMatrix, viewMatrix, projectionMatrix, _light, UIInputData.IsTerrainOn);
            _light.Stop();

            _light.Start();
            if (UIInputData.IsOceanOn)
            {
                _seaBed.Render(mode, worldMatrix, projectionMatrix, viewMatrix);
            }
        }