OpenGL fixes

glGetError() was returning GL_INVALID_OPERATION due to some minor missteps
pull/3/head
Daniel Richard G 2013-09-09 16:05:33 -04:00
parent 5cca524c62
commit bcb6c7b19b
3 changed files with 5 additions and 6 deletions

View File

@ -106,14 +106,14 @@ void glxVertex3v(Vector u)
glVertex3f((GLfloat)u.x, (GLfloat)u.y, (GLfloat)u.z);
}
void glxAxisAlignedQuad(double l, double r, double t, double b)
void glxAxisAlignedQuad(double l, double r, double t, double b, bool lone)
{
glBegin(GL_QUADS);
if(lone) glBegin(GL_QUADS);
glVertex2d(l, t);
glVertex2d(l, b);
glVertex2d(r, b);
glVertex2d(r, t);
glEnd();
if(lone) glEnd();
}
void glxAxisAlignedLineLoop(double l, double r, double t, double b)

View File

@ -199,7 +199,7 @@ typedef IdList<Param,hParam> ParamList;
// Utility functions that are provided in the platform-independent code.
void glxVertex3v(Vector u);
void glxAxisAlignedQuad(double l, double r, double t, double b);
void glxAxisAlignedQuad(double l, double r, double t, double b, bool lone = true);
void glxAxisAlignedLineLoop(double l, double r, double t, double b);
#define DEFAULT_TEXT_HEIGHT (11.5)
#define GLX_CALLBACK __stdcall

View File

@ -704,7 +704,6 @@ bool TextWindow::DrawOrHitTestColorPicker(int how, bool leftDown,
glVertex2d(cx, hy);
glVertex2d(cx, hym);
glEnd();
glEnd();
} else if(how == CLICK ||
(how == HOVER && leftDown && editControl.colorPicker.picker1dActive))
{
@ -857,7 +856,7 @@ void TextWindow::Paint(void) {
// Move the quad down a bit, so that the descenders
// still have the correct background.
y += adj;
glxAxisAlignedQuad(x, x + CHAR_WIDTH, y, y + bh);
glxAxisAlignedQuad(x, x + CHAR_WIDTH, y, y + bh, false);
y -= adj;
}
} else if(a == 1) {