Commits

rude committed 6d06191

Reduced the width and height of rectanges by one pixel.

Comments (0)

Files changed (1)

src/modules/graphics/opengl/Graphics.cpp

 		glEnable(GL_TEXTURE_2D);
 	}
 
-	void Graphics::rectangle(DrawMode mode, float x, float y, float w, float h )
+	void Graphics::rectangle(DrawMode mode, float x, float y, float w, float h)
 	{
 		glDisable(GL_TEXTURE_2D);
 		glPushMatrix();
 		case DRAW_LINE:
 			glBegin(GL_LINE_LOOP);
 				glVertex2f(x, y);
-				glVertex2f(x, y+h);
-				glVertex2f(x+w, y+h);
-				glVertex2f(x+w, y);
+				glVertex2f(x, y+h-1);
+				glVertex2f(x+w-1, y+h-1);
+				glVertex2f(x+w-1, y);
 			glEnd();
 			break;
 
 		case DRAW_FILL:
 			glBegin(GL_QUADS);
 				glVertex2f(x, y);
-				glVertex2f(x, y+h);
-				glVertex2f(x+w, y+h);
-				glVertex2f(x+w, y);
+				glVertex2f(x, y+h-1);
+				glVertex2f(x+w-1, y+h-1);
+				glVertex2f(x+w-1, y);
 			glEnd();
 			break;
 		}