Skip to content

Instantly share code, notes, and snippets.

@rdb
rdb / UBOs.py
Last active August 29, 2015 14:03 — forked from tobspr/UBOs.py
class Light:
def __init__(self):
self.pos = ParamVector3f(0)
self.color = ParamVector3f(1,1,0)
self.mvp = ParamMatrix4f(0)
self.struct = StructParameter()
array = ArrayParameter()
@rdb
rdb / main.py
Last active August 29, 2015 14:02 — forked from anonymous/main.py
# Simple render to texture
node = loader.loadModel("panda")
depthtex = Texture('depth')
depthtex.set_clear(1.0)
colortex = Texture('color')
colortex.set_clear((0, 0, 0, 1))
normaltex = Texture('normal')