Game engine: added Rasterizer.get/setMaterialMode to set texface,

multitexture or glsl materials. This does not affect existing
scenes, only newly created ones.
This commit is contained in:
Brecht Van Lommel
2008-09-13 19:19:51 +00:00
parent d2186508da
commit fa825e70e3
4 changed files with 102 additions and 27 deletions

View File

@@ -37,6 +37,10 @@ Example Uses an L{SCA_MouseSensor}, and two L{KX_ObjectActuator}s to implement M
# Centre the mouse
Rasterizer.setMousePosition(Rasterizer.getWindowWidth()/2, Rasterizer.getWindowHeight()/2)
@group Material Types: KX_TEXFACE_MATERIAL, KX_BLENDER_MULTITEX_MATERIAL, KX_BLENDER_GLSL_MATERIAL
@var KX_TEXFACE_MATERIAL: Materials as defined by the texture face settings.
@var KX_BLENDER_MULTITEX_MATERIAL: Materials approximating blender materials with multitexturing.
@var KX_BLENDER_BLENDER_MATERIAL: Materials approximating blender materials with GLSL.
"""
@@ -147,6 +151,21 @@ def getFocalLength():
@rtype: float
"""
def setMaterialMode(mode):
"""
Set the material mode to use for OpenGL rendering.
@type mode: KX_TEXFACE_MATERIAL, KX_BLENDER_MULTITEX_MATERIAL, KX_BLENDER_GLSL_MATERIAL
@note: Changes will only affect newly created scenes.
"""
def getMaterialMode(mode):
"""
Get the material mode to use for OpenGL rendering.
@rtype: KX_TEXFACE_MATERIAL, KX_BLENDER_MULTITEX_MATERIAL, KX_BLENDER_GLSL_MATERIAL
"""
def setGLSLMaterialSetting(setting, enable):
"""
Enables or disables a GLSL material setting.