Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/f/l/Flappy-0.3.7/flappy/display3d/scene3d.py   Flappy(Download)
            num_indeces = num_triangles * 3
 
        self._do(gl.bindBuffer, gl.ELEMENT_ARRAY_BUFFER, ibuffer.gl_buffer)
        self._do(gl.drawElements, gl.TRIANGLES, num_indeces,
                                            gl.UNSIGNED_SHORT, first_index)
        gl.useProgram(0)
        gl.bindBuffer(gl.ARRAY_BUFFER, 0)
        gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, 0)
        gl.bindFramebuffer(gl.FRAMEBUFFER, 0)
        gl.viewport(0.0, 0.0, self.stage.stageWidth, self.stage.stageHeight)

src/f/l/Flappy-0.3.7/flappy/display3d/indexbuffer3d.py   Flappy(Download)
    def upload(self, data):
        ndata = struct.pack('%sH' % len(data), *data)
        gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, self.gl_buffer)
        gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, ndata, gl.STATIC_DRAW)
        self.num_indeces = len(data)