Commit 98966958 authored by hybrid's avatar hybrid

This fix should allow for more than 4 textures in SMaterial. Now, up to 8 are...

This fix should allow for more than 4 textures in SMaterial. Now, up to 8 are supported. We have to check for the texture matrix stuff if adding more could be simplified instead of adding more and more texture matrix defines. Maybe we also need to add a limitation for the numbers of texture matrices to create for systems using less than 8 textures. This patch has not been tested with all drivers so far, but seems to work ok.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2479 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ebdae3b9
......@@ -62,6 +62,22 @@ namespace video
ETS_TEXTURE_2,
//! Texture transformation
ETS_TEXTURE_3,
#if _IRR_MATERIAL_MAX_TEXTURES_>4
//! Texture transformation
ETS_TEXTURE_4,
#if _IRR_MATERIAL_MAX_TEXTURES_>5
//! Texture transformation
ETS_TEXTURE_5,
#if _IRR_MATERIAL_MAX_TEXTURES_>6
//! Texture transformation
ETS_TEXTURE_6,
#if _IRR_MATERIAL_MAX_TEXTURES_>7
//! Texture transformation
ETS_TEXTURE_7,
#endif
#endif
#endif
#endif
//! Not used
ETS_COUNT
};
......
......@@ -94,6 +94,9 @@
//! Define _IRR_COMPILE_WITH_JOYSTICK_SUPPORT_ if you want joystick events.
#define _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
//! Maximum number of texture an SMaterial can have, up to 8 are supported by Irrlicht.
#define _IRR_MATERIAL_MAX_TEXTURES_ 4
//! Define _IRR_COMPILE_WITH_DIRECT3D_8_ and _IRR_COMPILE_WITH_DIRECT3D_9_ to
//! compile the Irrlicht engine with Direct3D8 and/or DIRECT3D9.
/** If you only want to use the software device or opengl this can be useful.
......
......@@ -165,7 +165,7 @@ namespace video
};
//! Maximum number of texture an SMaterial can have.
const u32 MATERIAL_MAX_TEXTURES = 4;
const u32 MATERIAL_MAX_TEXTURES = _IRR_MATERIAL_MAX_TEXTURES_;
//! Struct for holding parameters for a material renderer
class SMaterial
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment