Blender 3d game engine: KX_PolygonMaterial
Methods:
activate setTexture
setCustomMaterial updateTexture
Variables:
diffuse texture
drawingmode tface
gl_texture tile
lightlayer tilexrep
material tileyrep
shininess transparent
specular triangle
specularity zsort
Constants:
---------- ----------
Inherited
Methods:
isA ----------



Instance Methods

Notes


Note:
To access these functions, Use Blender Material must be unchecked.

Blender 2.48:
Select 'Texture Face Materials'

Note:
From what I've been able to puzzle out, this class uses python as an interface between Blender and the C programming language.  I think.

Note:
There's isn't any sample code.

List of functions


# get the currrent controller
controller = GameLogic.getCurrentController()

# get object that owns this controller
obj = controller.getOwner()
 
# get the first mesh of the object 
mesh = obj.getMesh(0)

# get the materials on the first mesh   
for mat in mesh.materials:

print dir(mat)

activate

activate(rasty, cachingInfo)

From the official documentation:

Sets material parameters for this object for rendering.

Material Parameters set:
1. Texture
2. Backface Culling
3. Line drawing
4. Specular Colour
5. Shininess
6. Diffuse Color
7. Polygon Offset

rasty(CObject) Rasterizer instance

cachingInfo (CObject) Material cache instance

setCustomMaterial

setCustomMaterial(material)

From the official documentation:

Sets the material state setup object.

Using this method, you can extend of completely replace the game engine material to do your own advanced multipass effects.

material (instance)  The material object.

setTexture

setTexture(tface)

From the official documentation:

Sets texture render state

tface (CObject)  Texture face

updateTexture

updateTexture(tface, rasty)

From the official documentation:

Updates a realtime animation.

tface (CObject) Texture face (eg. mat.tface)
rasty (CObject) Rasterizer




From the official documentation:

diffuse
The diffuse color of the material

drawingmode
Drawing mode for the material

gl_texture
OpenGL texture handle

lightlayer
Light layers this material affects

material
Material name

shininess
The shininess (specular exponent) of the material

specular
The specular color of the material

specularity
The amount of specular of the material

texture
Texture name

tface
Texture face properties

tile
Texture is tiling

tilexrep
Number of tile repetitions in the x direction

tileyrep
Number of tile repetitions in the y direction

transparent
This material is transparent

triangle
Mesh data with this material is triangles

zsort
Transparent polygons in meshes with this material will be sorted back to front before rendering





isA

isA(Type)

Checks the Object type.
(KX_GameObject, SCA_ILogicBrick, KX_Scene, etc.)

Type:  String

Return Type:  Bool
1 = True
0 = False

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the object controller attached to
owner = controller.getOwner()

# is owner a GameObject?
gameObject = owner.isA("KX_GameObject")


Blender 3D
Game Engine
Rapid prototyping for 3D games. Test realtime 3D gameplay without having to compile the game code. 3D game models automatically added.  GLSL shaders. Normal Mapping and Parallax Mapping. All OpenGL Lighting modes. This includes transparencies, animated and reflection mapped textures. Multiple textures and materials. UV mapping. Per-pixel lighting and dynamic lighting.  Uses Bullet Physics. Soft body dynamics. Rigid body dynamics. Collision detection and dynamics simulation. Collision bounds of all types. Car physics engine with full support for vehicle dynamics. (Spring reactions, stiffness, damping, tire friction etc.).