def paint_background(self): gles.glDisable(gles.GL_SCISSOR_TEST) gles.glClearColor(*self.bgcolor.tuple()) gles.glClear(gles.GL_COLOR_BUFFER_BIT | gles.GL_DEPTH_BUFFER_BIT)
def draw(self): from random import random gles.glClearColor(random(), random(), random(), 1.0) gles.glClear(gles.GL_COLOR_BUFFER_BIT | gles.GL_DEPTH_BUFFER_BIT)