public static void DrawWithoutTextures(GL_ControlModern control, Pass pass, Vector4 boxColor, Vector4 lineColor, Vector4 pickingColor) { control.CurrentShader = SolidColorShaderProgram; if (pass == Pass.OPAQUE) { SolidColorShaderProgram.SetVector4("color", boxColor); blockVao.Use(control); GL.DrawArrays(PrimitiveType.Quads, 0, 24); #region outlines GL.LineWidth(1); SolidColorShaderProgram.SetVector4("color", lineColor); linesVao.Use(control); GL.DrawArrays(PrimitiveType.Lines, 0, 24); GL.LineWidth(2); #endregion } else { SolidColorShaderProgram.SetVector4("color", pickingColor); blockVao.Use(control); GL.DrawArrays(PrimitiveType.Quads, 0, 24); } }
public static void Draw(GL_ControlModern control, Pass pass, Vector4 boxColor, Vector4 outlineColor, Vector4 pickingColor) { if (pass == Pass.OPAQUE) { control.CurrentShader = DefaultShaderProgram; GL.ActiveTexture(TextureUnit.Texture0); GL.BindTexture(TextureTarget.Texture2D, Framework.TextureSheet); DefaultShaderProgram.SetVector4("color", boxColor); blockVao.Use(control); GL.DrawArrays(PrimitiveType.Quads, 0, 24); #region outlines GL.LineWidth(1); control.CurrentShader = SolidColorShaderProgram; SolidColorShaderProgram.SetVector4("color", outlineColor); linesVao.Use(control); GL.DrawArrays(PrimitiveType.Lines, 0, 24); GL.LineWidth(2); #endregion } else { control.CurrentShader = SolidColorShaderProgram; SolidColorShaderProgram.SetVector4("color", pickingColor); blockVao.Use(control); GL.DrawArrays(PrimitiveType.Quads, 0, 24); } }
public static void DrawLineBox(GL_ControlModern control, Pass pass, Vector4 color, Vector4 pickingColor) { control.CurrentShader = SolidColorShaderProgram; if (pass == Pass.OPAQUE) { SolidColorShaderProgram.SetVector4("color", color); } else { GL.LineWidth(4); SolidColorShaderProgram.SetVector4("color", pickingColor); } linesVao.Use(control); GL.DrawArrays(PrimitiveType.Lines, 0, 24); GL.LineWidth(2); }