diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-15 11:50:06 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-15 11:50:06 (GMT) |
| commit | 2378363055950ec3ba50d42e6b1ff7b5c08a7af3 (patch) | |
| tree | 6353dfeb819abf698075695d463f38b3feadc81e /src/graphics/OpenGLDrawMethods.inl | |
| parent | 708379a3f859cb0d09e44c5b2c41469396809940 (diff) | |
| parent | 42d707f8a432afa001d58611fc960d6ce6021676 (diff) | |
| download | powder-2378363055950ec3ba50d42e6b1ff7b5c08a7af3.zip powder-2378363055950ec3ba50d42e6b1ff7b5c08a7af3.tar.gz | |
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/graphics/OpenGLDrawMethods.inl')
| -rw-r--r-- | src/graphics/OpenGLDrawMethods.inl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/graphics/OpenGLDrawMethods.inl b/src/graphics/OpenGLDrawMethods.inl index 7e3a418..db71fb7 100644 --- a/src/graphics/OpenGLDrawMethods.inl +++ b/src/graphics/OpenGLDrawMethods.inl @@ -1,6 +1,7 @@ #include "../data/font.h" int PIXELMETHODS_CLASS::drawtext(int x, int y, const char *s, int r, int g, int b, int a) { + bool invert = false; if(!strlen(s)) return 0; int oR = r, oG = g, oB = b; @@ -282,7 +283,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) +void PIXELMETHODS_CLASS::drawrect(int x, int y, int width, int height, int r, int g, int b, int a,bool hollow) { float fx = float(x)+0.5f; float fy = float(y)+0.5f; @@ -293,7 +294,10 @@ void PIXELMETHODS_CLASS::drawrect(int x, int y, int width, int height, int r, in //height-=2; //width-=2; glColor4ub(r, g, b, a); - glBegin(GL_LINE_STRIP); + if(hollow) + glBegin(GL_LINE_STRIP); + else + glBegin(GL_QUADS); glVertex2f(fx, fy); glVertex2f(fx+fwidth, fy); glVertex2f(fx+fwidth, fy+fheight); |
