X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=examples%2Fopengl%2Fmaterial.py;h=1c0fe38d673298a35948e1f58d86621e0025cae8;hb=410c9544d5585e71f26e85d90ffd142c76f97e43;hp=734749d6e98fc91cbc629b54367e6bafb113a279;hpb=65211f29fc6e1e540cc3e1c515753f860653382b;p=meshio%2Fpymeshio.git diff --git a/examples/opengl/material.py b/examples/opengl/material.py index 734749d..1c0fe38 100644 --- a/examples/opengl/material.py +++ b/examples/opengl/material.py @@ -43,6 +43,12 @@ class MQOMaterial(object): self.vcol=False self.texture=None + def __enter__(self): + self.begin() + + def __exit__(self): + self.end() + def begin(self): glColor4f(*self.rgba) if self.texture: @@ -61,8 +67,9 @@ class MQOMaterial(object): self.texture.end() def onInitialize(self): - if self.texture: - self.texture.onInitialize() + pass + #if self.texture: + # self.texture.onInitialize() @staticmethod def create(src, basedir):