4 from OpenGL.GL import *
12 class Material(object):
13 def __init__(self, r, g, b, a):
20 glColor4f(self.r, self.g, self.b, self.a)
25 def onInitialize(self):
30 m=material.Material(*src.col)
40 class MQOMaterial(object):
42 self.rgba=(0, 0, 0, 0)
52 glEnable(GL_CULL_FACE)
56 glEnable(GL_ALPHA_TEST);
57 glAlphaFunc(GL_GREATER, 0.5);
63 def onInitialize(self):
65 self.texture.onInitialize()
68 def create(src, basedir):
69 m=MQOMaterial(src.color)
71 m.texture=texture.Texture((basedir+'/'+src.tex).replace('\\', '/'))