Did I find the right examples for you? yes no

All Samples(17)  |  Call(11)  |  Derive(0)  |  Import(6)

src/c/h/chemshapes-HEAD/host/gletools/examples/r2vb.py   chemshapes(Download)
from __future__ import with_statement
 
import pyglet
from util import gl_init, ChangeValue, nested, quad, Sun
from gletools.gl import *
    def update_from(self, source):
        with nested(self.fbo, self.view, source, self.program):
            quad(self.width, self.height, 0, 0)
            self.vbo.vertices.copy_from(self.vertex_texture)
            self.vbo.normals.copy_from(self.normal_texture)
        heightmap.update_from(texture)
 
        with nested(projection, Color, sun):
            glColor3f(0.5, 0.5, 0.5)
            glPushMatrix()

src/c/h/chemshapes-HEAD/host/gletools/examples/ripples.py   chemshapes(Download)
"""
from __future__ import with_statement
from util import quad, nested
import random
 
        self.tex3.unit = GL_TEXTURE2
 
        with nested(self.framebuffer, self.program, self.tex2, self.tex3):
            quad(self.width, self.height, 0, 0)
 
    def on_mouse_motion(x, y, rx, ry):
        with nested(ripples.framebuffer, Color):
            glColor4f(0.0, 1.5, 3.0, 1.0)
            glLineWidth(1.0)
            glBegin(GL_LINES)
    def on_mouse_press(x, y, button, modifiers):
        with nested(ripples.framebuffer, Color):
            glColor4f(0.0, 1.5, 3.0, 1.0)
            glBegin(GL_QUADS)
            size = 1.0
    def rain(delta):
        x = random.randint(0, ripples.width)
        y = random.randint(0, ripples.height)
        size = random.random() * 1.5
        with nested(ripples.framebuffer, Color):

src/c/h/chemshapes-HEAD/host/gletools/examples/pseudo_instancing.py   chemshapes(Download)
from gletools import Projection, Lighting, Color, VertexObject
from gletools.gl import *
from util import Mesh, gl_init, ChangeValue, nested
from random import random
 
    def on_draw():
        window.clear()
 
        with nested(projection, Lighting, bunny.vbo):
            glClearColor(0.0,0.0,0.0,0.0)

src/c/h/chemshapes-HEAD/host/gletools/examples/instancing.py   chemshapes(Download)
from gletools import Projection, Lighting, Color, VertexObject
from gletools.gl import *
from util import Mesh, gl_init, ChangeValue, nested
from random import random
 
    def on_draw():
        window.clear()
 
        with nested(projection, Lighting):
            glClearColor(0.0,0.0,0.0,0.0)

src/c/h/chemshapes-HEAD/host/gletools/examples/waves.py   chemshapes(Download)
"""
from __future__ import with_statement
from util import quad, nested, ChangeValue, gl_init, Processor, Sun
import random
 
    def rain(delta):
        x = random.randint(0, ripples.width)
        y = random.randint(0, ripples.height)
        size = random.random() * 0.5
        with nested(ripples.framebuffer, Color):
        heightmap.update_from(height_texture)
 
        with nested(projection, Color, sun):
            glColor3f(7/256.0, 121/256.0, 208/256.0)
            glPushMatrix()

src/c/h/chemshapes-HEAD/host/gletools/examples/vbo.py   chemshapes(Download)
from gletools import Projection, Lighting, Color, VertexObject
from gletools.gl import *
from util import Mesh, gl_init, ChangeValue, nested
 
window = pyglet.window.Window()
def on_draw():
    window.clear()
 
    with nested(projection, Lighting):
        glClearColor(0.0,0.0,0.0,0.0)