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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user