Check Material Render Capabilitys / Set Fallback Texture
Posted: Sun Jan 16, 2011 5:04 pm
Hi guys,
I'm working on a small game framework for my game. Since the game itself is also targeted on older machines (or laptops, same deal), I have to find some way, to manually disable some graphical features.
This means essentially to check if a certain material can be rendered "as-is", or not. In case it can't, I want to use an EMT_SOLID material with just one texture (I assume every pc can at least render something like that) instead.
I know Irrlicht automatically disables features it can't use, but in my case that means i have to use a different texture (diffuse texture + normal map, vs. a prebuilt texture) as well.
I found two functions, but they didn't quite seem to help my problem the way I thought about it. Maybe I'm just on the wrong track all along?
IMaterialRenderer.getRenderCapability()
IVideoDriver.queryFeature ()
But as if this is not complicated enough, I want to implement a basic shader support later. I thing I'll have the same problem mentioned above, but even less possibilities to check if I can use that shader, since I didn't find any remote way to check which features a certain shader might use.
Any toughts?
So long,
Kernle[/url]
I'm working on a small game framework for my game. Since the game itself is also targeted on older machines (or laptops, same deal), I have to find some way, to manually disable some graphical features.
This means essentially to check if a certain material can be rendered "as-is", or not. In case it can't, I want to use an EMT_SOLID material with just one texture (I assume every pc can at least render something like that) instead.
I know Irrlicht automatically disables features it can't use, but in my case that means i have to use a different texture (diffuse texture + normal map, vs. a prebuilt texture) as well.
I found two functions, but they didn't quite seem to help my problem the way I thought about it. Maybe I'm just on the wrong track all along?
IMaterialRenderer.getRenderCapability()
IVideoDriver.queryFeature ()
But as if this is not complicated enough, I want to implement a basic shader support later. I thing I'll have the same problem mentioned above, but even less possibilities to check if I can use that shader, since I didn't find any remote way to check which features a certain shader might use.
Any toughts?
So long,
Kernle[/url]