diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-01-04 11:30:18 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-01-08 00:32:35 +0300 |
commit | e20b30a1d8573ab687e05da606ee62e2f079a066 (patch) | |
tree | 125677a0f788f017edbe837f20eb27e6fd63c799 /source/blender/editors/screen | |
parent | 261ac69f57a9daac370f0a25af955d725d6c77be (diff) |
OpenGL: remove glPointSize hack
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 0b83bf993ae..a870b108fad 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -730,101 +730,6 @@ void glaEnd2DDraw(gla2DDrawInfo *di) } #endif -/* **************** GL_POINT hack ************************ */ - -static int curmode = 0; -static int pointhack = 0; -static GLubyte Squaredot[16] = {0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff}; - -void bglBegin(int mode) -{ - curmode = mode; - - if (mode == GL_POINTS) { - float value[4]; - glGetFloatv(GL_POINT_SIZE_RANGE, value); - if (value[1] < 2.0f) { - glGetFloatv(GL_POINT_SIZE, value); - pointhack = iroundf(value[0]); - if (pointhack > 4) pointhack = 4; - } - else { - glBegin(mode); - } - } -} - -#if 0 /* UNUSED */ -int bglPointHack(void) -{ - float value[4]; - int pointhack_px; - glGetFloatv(GL_POINT_SIZE_RANGE, value); - if (value[1] < 2.0f) { - glGetFloatv(GL_POINT_SIZE, value); - pointhack_px = floorf(value[0] + 0.5f); - if (pointhack_px > 4) pointhack_px = 4; - return pointhack_px; - } - return 0; -} -#endif - -void bglVertex3fv(const float vec[3]) -{ - switch (curmode) { - case GL_POINTS: - if (pointhack) { - glRasterPos3fv(vec); - glBitmap(pointhack, pointhack, (float)pointhack / 2.0f, (float)pointhack / 2.0f, 0.0, 0.0, Squaredot); - } - else { - glVertex3fv(vec); - } - break; - } -} - -void bglVertex3f(float x, float y, float z) -{ - switch (curmode) { - case GL_POINTS: - if (pointhack) { - glRasterPos3f(x, y, z); - glBitmap(pointhack, pointhack, (float)pointhack / 2.0f, (float)pointhack / 2.0f, 0.0, 0.0, Squaredot); - } - else { - glVertex3f(x, y, z); - } - break; - } -} - -void bglVertex2fv(const float vec[2]) -{ - switch (curmode) { - case GL_POINTS: - if (pointhack) { - glRasterPos2fv(vec); - glBitmap(pointhack, pointhack, (float)pointhack / 2, pointhack / 2, 0.0, 0.0, Squaredot); - } - else { - glVertex2fv(vec); - } - break; - } -} - - -void bglEnd(void) -{ - if (pointhack) pointhack = 0; - else glEnd(); - -} /* Uses current OpenGL state to get view matrices for gluProject/gluUnProject */ void bgl_get_mats(bglMats *mats) |