glDrawArrays(GL_QUADS, 4, 8)
glColor4ub(5, 171, 231, 128)
glDrawArrays(GL_QUADS, 12, 8)
+ glDisableClientState(GL_VERTEX_ARRAY)
sx = self._machineSize[0]
sy = self._machineSize[1]
glVertex3f(x1, y2, -0.02)
glEnd()
- glDisableClientState(GL_VERTEX_ARRAY)
glDisable(GL_BLEND)
glDisable(GL_CULL_FACE)
for i in xrange(0, int(self._size / batchSize)):
glDrawArrays(render_type, i * batchSize, batchSize)
glDrawArrays(render_type, extraStartPos, extraCount)
- if self._buffer is None:
+ if self._buffer is not None:
glBindBuffer(GL_ARRAY_BUFFER, 0)
glDisableClientState(GL_VERTEX_ARRAY)
class glGuiPanel(glcanvas.GLCanvas):
def __init__(self, parent):
- attribList = (glcanvas.WX_GL_RGBA, glcanvas.WX_GL_DOUBLEBUFFER, glcanvas.WX_GL_DEPTH_SIZE, 32, glcanvas.WX_GL_STENCIL_SIZE, 8)
+ attribList = (glcanvas.WX_GL_RGBA, glcanvas.WX_GL_DOUBLEBUFFER, glcanvas.WX_GL_DEPTH_SIZE, 32, glcanvas.WX_GL_STENCIL_SIZE, 8, 0)
glcanvas.GLCanvas.__init__(self, parent, style=wx.WANTS_CHARS, attribList = attribList)
self._base = self
self._focus = None