diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-15 12:02:15 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-15 12:02:15 (GMT) |
| commit | 1e406eeaf4d9e88f3638d3d145a48e58efc07f93 (patch) | |
| tree | 1e62e168b838350fa2167d3c0a043494f281bbe3 /src/graphics/OpenGLDrawMethods.inl | |
| parent | 54a81031bcb8e67ef661fb4f96cb2f65501f4c85 (diff) | |
| download | powder-1e406eeaf4d9e88f3638d3d145a48e58efc07f93.zip powder-1e406eeaf4d9e88f3638d3d145a48e58efc07f93.tar.gz | |
Revert some changes by Triclops200 in 42d707f8a432afa001d58611fc960d6ce6021676, Broke prototypes for drawrect with pixel functions, seems to have modified drawrect to make filled rects (forgot about fillrect?). Also use correct macros for getting colour components out of pixel data
Diffstat (limited to 'src/graphics/OpenGLDrawMethods.inl')
| -rw-r--r-- | src/graphics/OpenGLDrawMethods.inl | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/graphics/OpenGLDrawMethods.inl b/src/graphics/OpenGLDrawMethods.inl index cbf3113..173cb4b 100644 --- a/src/graphics/OpenGLDrawMethods.inl +++ b/src/graphics/OpenGLDrawMethods.inl @@ -282,7 +282,7 @@ void PIXELMETHODS_CLASS::draw_line(int x, int y, int x2, int y2, int r, int g, i glEnd(); } -void PIXELMETHODS_CLASS::drawrect(int x, int y, int width, int height, int r, int g, int b, int a,bool hollow) +void PIXELMETHODS_CLASS::drawrect(int x, int y, int width, int height, int r, int g, int b, int a) { float fx = float(x)+0.5f; float fy = float(y)+0.5f; @@ -293,10 +293,7 @@ void PIXELMETHODS_CLASS::drawrect(int x, int y, int width, int height, int r, in //height-=2; //width-=2; glColor4ub(r, g, b, a); - if(hollow) - glBegin(GL_LINE_STRIP); - else - glBegin(GL_QUADS); + glBegin(GL_LINE_STRIP); glVertex2f(fx, fy); glVertex2f(fx+fwidth, fy); glVertex2f(fx+fwidth, fy+fheight); |
