private void CameraPostRender() { GLUI.SetLineMaterial(); foreach (var hdl in glHandlers) { hdl.Execute(); } }
public override void ExecuteCommand(Command command) { var cmd = command as GLUICommand; switch (cmd.type) { case GLUICmdType.LoadOrtho: GL.LoadOrtho(); break; case GLUICmdType.DrawLineOrtho: if (ArgType <Vector2, Vector2>(cmd)) { GLUI.DrawLineOrtho((Vector2)cmd.args[0], (Vector2)cmd.args[1]); } else if (ArgType <Vector2, Vector2, Color>(cmd)) { GLUI.DrawLineOrtho((Vector2)cmd.args[0], (Vector2)cmd.args[1], (Color)cmd.args[2]); } else if (ArgType <Vector2, Vector2, Color, bool>(cmd)) { GLUI.DrawLineOrtho((Vector2)cmd.args[0], (Vector2)cmd.args[1], (Color)cmd.args[2], (bool)cmd.args[3]); } else if (ArgType <Vector2, Vector2, float>(cmd)) { GLUI.DrawLineWidth((Vector2)cmd.args[0], (Vector2)cmd.args[1], (float)cmd.args[2]); } else if (ArgType <Vector2, Vector2, float, Color>(cmd)) { GLUI.DrawLineWidth((Vector2)cmd.args[0], (Vector2)cmd.args[1], (float)cmd.args[2], (Color)cmd.args[3]); } else { throw null; } break; default: throw null; } }