diff options
author | Ulysse Martin <you.le@live.fr> | 2016-02-18 13:56:25 +0300 |
---|---|---|
committer | Porteries Tristan <republicthunderbolt9@gmail.com> | 2016-02-18 14:05:53 +0300 |
commit | 608ee3e0734cc307c282a49518c595c674bbb9f0 (patch) | |
tree | 899118179541db8ea68a3673c58624bc021f814c /doc/python_api | |
parent | e24323ea4012482c4ede3b8ed3a80fe91f416e6e (diff) |
BGE: Allow access to original texture openGL Bind code/Id/Number
This patch adds a python method to get openGL bind code of material's texture according to the texture slot.
Example:
import bge
cont = bge.logic.getCurrentController()
own = cont.owner
bindId = own.meshes[0].materials[0].getTextureBindcode(0)
Test file: http://www.pasteall.org/blend/40679
This can be used to play with texture in openGL, for example, remove mipmap on the texture or play with all wrapping or filtering options.
And this can be used to learn openGL with Blender.
Reviewers: TwisterGE, kupoman, moguri, panzergame
Reviewed By: TwisterGE, kupoman, moguri, panzergame
Projects: #game_engine
Differential Revision: https://developer.blender.org/D1804
Diffstat (limited to 'doc/python_api')
-rw-r--r-- | doc/python_api/rst/bge_types/bge.types.KX_BlenderMaterial.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_BlenderMaterial.rst b/doc/python_api/rst/bge_types/bge.types.KX_BlenderMaterial.rst index 17f54031ec3..ece2a65af71 100644 --- a/doc/python_api/rst/bge_types/bge.types.KX_BlenderMaterial.rst +++ b/doc/python_api/rst/bge_types/bge.types.KX_BlenderMaterial.rst @@ -89,6 +89,15 @@ base class --- :class:`PyObjectPlus` :return: the material's shader :rtype: :class:`BL_Shader` + .. method:: getTextureBindcode(textureslot) + + Returns the material's texture OpenGL bind code/id/number/name. + + :arg textureslot: Specifies the texture slot number + :type textureslot: integer + :return: the material's texture OpenGL bind code/id/number/name + :rtype: integer + .. attribute:: alpha The material's alpha transparency. |