def draw(self, frame, render_device, left, top, right, bottom):

        glPushAttrib(GL_CURRENT_BIT | GL_LIGHTING_BIT | GL_ENABLE_BIT)
        glEnable(GL_LIGHTING)
        glEnable(GL_LIGHT0)
        glEnable(GL_COLOR_MATERIAL)
        glEnable(GL_DEPTH_TEST)
        glColor3f(1, .5, .5)

        # This is a somewhat complicated way of setting up a projection
        # into the render box.  It's a bit hacky, really it should read
        # the modelview (instead of window.height + offset_top).  We
        # should encapsulate this somewhere because it's useful.

        # Should also be setting up clipping planes around the render area.
        glMatrixMode(GL_PROJECTION)
        glPushMatrix()
        glLoadIdentity()
        width = right - left
        height = top - bottom
        centerx = left + width / 2
        centery = bottom + height / 2 + window.height
        glTranslatef(-1, -1, 0)
        glTranslatef(centerx * 2 / window.width, 
                     centery * 2 / window.height, 0)
        glScalef(width / window.width, window.height / height, 1)
        gluPerspective(70., width / float(height), 1, 100)

        glMatrixMode(GL_MODELVIEW)
        glPushMatrix()
        glLoadIdentity()

        # Done setting up the projection, everything hereon is "normal"
        vec4 = (c_float * 4)
        glLightfv(GL_LIGHT0, GL_POSITION, vec4(1, 2, 1, 0))
        glLightfv(GL_LIGHT0, GL_DIFFUSE, vec4(.7, .7, .7, 1))

        glTranslatef(0, 0, -3)
        glRotatef(30, 1, 0, 0)
        glRotatef(self.angle, 0, 1, 0)
        self.cube.draw()

        glPopMatrix()
        glMatrixMode(GL_PROJECTION)
        glPopMatrix()
        glMatrixMode(GL_MODELVIEW)

        glPopAttrib()
dataset/ETHPy150Open ardekantur/pyglet/contrib/layout/examples/xhtml_replaced.py/CubeDrawable.draw/swapped operands of `/`