CSharpGL.GLState.On C# (CSharp) Method

On() public method

public On ( ) : void
return void
        public void On()
        {
            if (this.Enabled)
            {
                this.inUse = true;
                this.StateOn();
            }
        }

Usage Example

Example #1
0
        protected override void DoRender(RenderEventArgs arg)
        {
            ICamera camera     = arg.CameraStack.Peek();
            mat4    projection = camera.GetProjectionMatrix();
            mat4    view       = camera.GetViewMatrix();
            mat4    model      = this.GetModelMatrix();

            this.SetUniform(projectionMatrix, projection);
            this.SetUniform(viewMatrix, view);
            this.SetUniform(modelMatrix, model);

            if (this.RenderWireframe)
            {
                // render wireframe.
                this.SetUniform("renderWireframe", true);
                polygonMode.On();
                polygonOffsetState.On();
                base.DoRender(arg);
                polygonOffsetState.Off();
                polygonMode.Off();
            }

            if (this.RenderBody)
            {
                // render solid body.
                this.SetUniform("renderWireframe", false);
                base.DoRender(arg);
            }
        }
All Usage Examples Of CSharpGL.GLState::On