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)
58 glEnable(GL_CULL_FACE)
62 glEnable(GL_ALPHA_TEST);
63 glAlphaFunc(GL_GREATER, 0.5);
69 def onInitialize(self):
72 # self.texture.onInitialize()
75 def create(src, basedir):
76 m=MQOMaterial(src.color)
78 m.texture=texture.Texture((basedir+'/'+src.tex).replace('\\', '/'))