summaryrefslogtreecommitdiff
path: root/src/graphics/OpenGLDrawMethods.inl
diff options
context:
space:
mode:
authorBryan Hoyle <starfoxprime@gmail.com>2012-08-15 03:18:39 (GMT)
committer Bryan Hoyle <starfoxprime@gmail.com>2012-08-15 03:18:39 (GMT)
commit42d707f8a432afa001d58611fc960d6ce6021676 (patch)
tree63654e26cb9dfddc6b82250cb3703e1f86f98ec9 /src/graphics/OpenGLDrawMethods.inl
parentc8080cb0251890b3a9513756e2438ca0f03ffbd6 (diff)
downloadpowder-42d707f8a432afa001d58611fc960d6ce6021676.zip
powder-42d707f8a432afa001d58611fc960d6ce6021676.tar.gz
Very very basic wall rendering for opengl
Diffstat (limited to 'src/graphics/OpenGLDrawMethods.inl')
-rw-r--r--src/graphics/OpenGLDrawMethods.inl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/graphics/OpenGLDrawMethods.inl b/src/graphics/OpenGLDrawMethods.inl
index ac99165..cbf3113 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;
@@ -281,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)
+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;
@@ -292,7 +293,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);