1
0
Fork 0

Hack to fix Windows build.

glBlendFuncSeperate will need some ugly trick to use in CanvasWidget, I better find another way.
This commit is contained in:
James Turner 2017-10-20 17:25:06 +01:00
parent 804dc4e74a
commit c1df6e9d15

View file

@ -197,8 +197,8 @@ void CanvasWidget::setSize(int w, int h)
void CanvasWidget::draw(int dx, int dy) void CanvasWidget::draw(int dx, int dy)
{ {
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND); // glEnable(GL_BLEND);
glBlendFuncSeparate(GL_ONE, GL_ZERO, GL_ZERO, GL_ONE); // glBlendFuncSeparate(GL_ONE, GL_ZERO, GL_ZERO, GL_ONE);
glBindTexture(GL_TEXTURE_2D, _canvas_mgr->getCanvasTexId(_canvas)); glBindTexture(GL_TEXTURE_2D, _canvas_mgr->getCanvasTexId(_canvas));
glBegin( GL_QUADS ); glBegin( GL_QUADS );
@ -209,5 +209,5 @@ void CanvasWidget::draw(int dx, int dy)
glTexCoord2f(0,1); glVertex2f(dx + abox.min[0], dy + abox.max[1]); glTexCoord2f(0,1); glVertex2f(dx + abox.min[0], dy + abox.max[1]);
glEnd(); glEnd();
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
glDisable(GL_BLEND); // glDisable(GL_BLEND);
} }