Blender Git Loki

Git Commits -> Revision 608ee3e

Revision 608ee3e by Ulysse Martin (master)
February 18, 2016, 11:05 (GMT)
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

Commit Details:

Full Hash: 608ee3e0734cc307c282a49518c595c674bbb9f0
Parent Commit: e24323e
Committed By: Porteries Tristan
Lines Changed: +27, -0

3 Modified Paths:

/doc/python_api/rst/bge_types/bge.types.KX_BlenderMaterial.rst (+9, -0) (Diff)
/source/gameengine/Ketsji/KX_BlenderMaterial.cpp (+17, -0) (Diff)
/source/gameengine/Ketsji/KX_BlenderMaterial.h (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021