- Home /
Draw Rectangle
I am trying to draw a rectangle, and it works when dragging my mouse from top to bottom, but not bottom to top and I have absolutely no idea why.
GL.PushMatrix();
selectBoxMat.SetPass(0);
GL.LoadPixelMatrix();
//GL.Color(Color.red);
GL.Begin(GL.QUADS);
GL.Vertex3(mouseDown.x, mouseDown.y, 0);
GL.Vertex3(mouseDown.x + 2, mouseDown.y , 0);
GL.Vertex3(mouseDown.x + 2, mouseCurrent.y , 0);
GL.Vertex3(mouseDown.x, mouseCurrent.y , 0);
GL.End();
Ideas?
Comment
Your answer
Follow this Question
Related Questions
Drawing a box from a button click 2 Answers
How can I draw a box ingame? 2 Answers
Multiple button draws 1 Answer
Script only runs once? 2 Answers
Script only runs once? 0 Answers