示例#1
0
    def draw(self):
        if self._showing and len(self.options) > 0:
            glDisable(GL_LIGHTING)
            self.box.draw()
            cursorX, cursorY = self.posn
            cursorX += 12
            cursorY += 12 + 20 * self.selectedOption

            GLUtil.drawAt((cursorX, cursorY), self.cursorTexture,
                          self.cursorImage)

            glEnable(GL_LIGHTING)
示例#2
0
    def draw(self):
        if self._showing and len(self.options) > 0:
            glDisable(GL_LIGHTING)
            self.box.draw()
            cursorX, cursorY = self.posn
            cursorX += 12
            cursorY += 12 + 20 * self.selectedOption

            GLUtil.drawAt((cursorX, cursorY),
                          self.cursorTexture, self.cursorImage)

            glEnable(GL_LIGHTING)
示例#3
0
    def makeBorder(self):
        width = self.width
        height = self.height
        if height == None:
            height = len(self.displayers)
        height *= 20

        image = GLUtil.createBorder(width, height)

        (texture, image) = GLUtil.makeTexture(image, None)

        listID = glGenLists(1)
        glNewList(listID, GL_COMPILE_AND_EXECUTE)
        GLUtil.drawAt(self.posn, texture, image)
        glEndList()
        return (listID, texture)
示例#4
0
    def makeBorder(self):
        width = self.width
        height = self.height
        if height == None:
            height = len(self.displayers)
        height *= 20

        image = GLUtil.createBorder(width, height)

        (texture, image) = GLUtil.makeTexture(image, None)

        listID = glGenLists(1)
        glNewList(listID, GL_COMPILE_AND_EXECUTE)
        GLUtil.drawAt(self.posn, texture, image)
        glEndList()
        return (listID, texture)