/// <summary> /// /// </summary> /// <param name="arg"></param> protected override void DoRender(RenderEventArgs arg) { if (this.boundingBoxColorRecord.IsMarked()) { this.SetUniform("boundingBoxColor", this.boundingBoxColor); this.boundingBoxColorRecord.CancelMark(); } this.SetUniform("projectionMatrix", arg.Camera.GetProjectionMatrix()); this.SetUniform("viewMatrix", arg.Camera.GetViewMatrix()); MarkableStruct <mat4> model = this.GetModelMatrix(); if (this.modelTicks != model.UpdateTicks) { this.SetUniform("modelMatrix", model.Value); this.modelTicks = model.UpdateTicks; } base.DoRender(arg); }
/// <summary> /// /// </summary> /// <param name="arg"></param> protected override void DoRender(CSharpGL.RenderEventArgs arg) { mat4 projection = arg.Camera.GetProjectionMatrix(); mat4 view = arg.Camera.GetViewMatrix(); this.SetUniform("projectionMatrix", projection); this.SetUniform("viewMatrix", view); MarkableStruct <mat4> model = this.GetModelMatrix(); if (this.modelTicks != model.UpdateTicks) { this.SetUniform("modelMatrix", model.Value); this.modelTicks = model.UpdateTicks; } if (this.pointColorRecord.IsMarked()) { this.SetUniform("PointColor", this.pointColor); this.pointColorRecord.CancelMark(); } base.DoRender(arg); }