diff options
| author | Bryan Hoyle <starfoxprime@gmail.com> | 2012-08-12 20:45:37 (GMT) |
|---|---|---|
| committer | Bryan Hoyle <starfoxprime@gmail.com> | 2012-08-12 20:45:37 (GMT) |
| commit | ca7c0e7370542a97dd03210e13ec2c56679d5ca4 (patch) | |
| tree | 28e039d982f2af545ea584fea12c664c1bd89999 /src/graphics | |
| parent | 0a01eacd0965834842e84e2381650c2cc68d9850 (diff) | |
| download | powder-ca7c0e7370542a97dd03210e13ec2c56679d5ca4.zip powder-ca7c0e7370542a97dd03210e13ec2c56679d5ca4.tar.gz | |
More efficiency, fix of point size being too big
Diffstat (limited to 'src/graphics')
| -rw-r--r-- | src/graphics/OpenGLDrawMethods.inl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/graphics/OpenGLDrawMethods.inl b/src/graphics/OpenGLDrawMethods.inl index a197aca..55b4f21 100644 --- a/src/graphics/OpenGLDrawMethods.inl +++ b/src/graphics/OpenGLDrawMethods.inl @@ -241,16 +241,21 @@ void PIXELMETHODS_CLASS::xor_bitmap(unsigned char * bitmap, int x, int y, int w, //glDisable(GL_COLOR_LOGIC_OP); glPixelStorei(GL_UNPACK_ALIGNMENT, 4); */ + float old_size; + glGetFloatv(GL_POINT_SIZE,&old_size); + + glPointSize(1.0); + glBegin(GL_POINTS); glColor4f(1.0f,1.0f,1.0f,1.0f); for(int i =0; i < w*h; i++) { - glBegin(GL_POINTS); if(bitmap[i]==255) { glVertex2f(x+i%w,y+i/w); } - glEnd(); } + glEnd(); + glPointSize(old_size); } void PIXELMETHODS_CLASS::draw_line(int x, int y, int x2, int y2, int r, int g, int b, int a) |
