mat4 IOrthoCamera.GetOrthoProjectionMatrix()
        {
            if (orthoCameraRecord.IsMarked())
            {
                var camera = this as IOrthoCamera;
                orhtoProjectionMatrix = glm.ortho(
                    (float)camera.Left, (float)camera.Right,
                    (float)camera.Bottom, (float)camera.Top,
                    (float)camera.Near, (float)camera.Far);
            }

            return(this.orhtoProjectionMatrix);
        }
Exemple #2
0
        protected override void DoRender(RenderEventArgs arg)
        {
            if (wellPipelineColorRecord.IsMarked())
            {
                this.SetUniform("wellColor", this.wellColor.ToVec4());
                wellPipelineColorRecord.CancelMark();
            }

            mat4 mvp = arg.Camera.GetProjectionMatrix() * arg.Camera.GetViewMatrix() * this.GetModelMatrix();

            this.SetUniform("mvp", mvp);

            base.DoRender(arg);
        }