Commit b2f1c1ff authored by hybrid's avatar hybrid

Fix attribute value for maximal lights. Add video driver feature flag for texture matrix support.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3818 dfc29bdd-3216-0410-991c-e03cc46cb475
parent dabb1652
...@@ -115,6 +115,9 @@ namespace video ...@@ -115,6 +115,9 @@ namespace video
//! Support for different blend functions. Without, only ADD is available //! Support for different blend functions. Without, only ADD is available
EVDF_BLEND_OPERATIONS, EVDF_BLEND_OPERATIONS,
//! Support for texture coord transformation via texture matrix
EVDF_TEXTURE_MATRIX,
//! Only used for counting the elements of this enum //! Only used for counting the elements of this enum
EVDF_COUNT EVDF_COUNT
}; };
......
...@@ -393,6 +393,7 @@ bool CD3D8Driver::initDriver(const core::dimension2d<u32>& screenSize, ...@@ -393,6 +393,7 @@ bool CD3D8Driver::initDriver(const core::dimension2d<u32>& screenSize,
DriverAttributes->setAttribute("MaxTextures", (s32)MaxTextureUnits); DriverAttributes->setAttribute("MaxTextures", (s32)MaxTextureUnits);
DriverAttributes->setAttribute("MaxSupportedTextures", (s32)Caps.MaxSimultaneousTextures); DriverAttributes->setAttribute("MaxSupportedTextures", (s32)Caps.MaxSimultaneousTextures);
DriverAttributes->setAttribute("MaxLights", (s32)Caps.MaxActiveLights);
DriverAttributes->setAttribute("MaxAnisotropy", (s32)Caps.MaxAnisotropy); DriverAttributes->setAttribute("MaxAnisotropy", (s32)Caps.MaxAnisotropy);
DriverAttributes->setAttribute("MaxUserClipPlanes", (s32)Caps.MaxUserClipPlanes); DriverAttributes->setAttribute("MaxUserClipPlanes", (s32)Caps.MaxUserClipPlanes);
DriverAttributes->setAttribute("MaxIndices", (s32)Caps.MaxVertexIndex); DriverAttributes->setAttribute("MaxIndices", (s32)Caps.MaxVertexIndex);
...@@ -606,6 +607,7 @@ bool CD3D8Driver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const ...@@ -606,6 +607,7 @@ bool CD3D8Driver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const
case EVDF_COLOR_MASK: case EVDF_COLOR_MASK:
return (Caps.PrimitiveMiscCaps & D3DPMISCCAPS_COLORWRITEENABLE) != 0; return (Caps.PrimitiveMiscCaps & D3DPMISCCAPS_COLORWRITEENABLE) != 0;
case EVDF_BLEND_OPERATIONS: case EVDF_BLEND_OPERATIONS:
case EVDF_TEXTURE_MATRIX:
return true; return true;
default: default:
return false; return false;
......
...@@ -440,6 +440,7 @@ bool CD3D9Driver::initDriver(HWND hwnd, bool pureSoftware) ...@@ -440,6 +440,7 @@ bool CD3D9Driver::initDriver(HWND hwnd, bool pureSoftware)
DriverAttributes->setAttribute("MaxTextures", (s32)MaxTextureUnits); DriverAttributes->setAttribute("MaxTextures", (s32)MaxTextureUnits);
DriverAttributes->setAttribute("MaxSupportedTextures", (s32)Caps.MaxSimultaneousTextures); DriverAttributes->setAttribute("MaxSupportedTextures", (s32)Caps.MaxSimultaneousTextures);
DriverAttributes->setAttribute("MaxLights", (s32)Caps.MaxActiveLights);
DriverAttributes->setAttribute("MaxAnisotropy", (s32)Caps.MaxAnisotropy); DriverAttributes->setAttribute("MaxAnisotropy", (s32)Caps.MaxAnisotropy);
DriverAttributes->setAttribute("MaxUserClipPlanes", (s32)Caps.MaxUserClipPlanes); DriverAttributes->setAttribute("MaxUserClipPlanes", (s32)Caps.MaxUserClipPlanes);
DriverAttributes->setAttribute("MaxMultipleRenderTargets", (s32)Caps.NumSimultaneousRTs); DriverAttributes->setAttribute("MaxMultipleRenderTargets", (s32)Caps.NumSimultaneousRTs);
...@@ -658,6 +659,7 @@ bool CD3D9Driver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const ...@@ -658,6 +659,7 @@ bool CD3D9Driver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const
case EVDF_POLYGON_OFFSET: case EVDF_POLYGON_OFFSET:
return (Caps.RasterCaps & (D3DPRASTERCAPS_DEPTHBIAS|D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS)) != 0; return (Caps.RasterCaps & (D3DPRASTERCAPS_DEPTHBIAS|D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS)) != 0;
case EVDF_BLEND_OPERATIONS: case EVDF_BLEND_OPERATIONS:
case EVDF_TEXTURE_MATRIX:
return true; return true;
default: default:
return false; return false;
......
...@@ -647,7 +647,7 @@ bool COpenGLDriver::genericDriverInit() ...@@ -647,7 +647,7 @@ bool COpenGLDriver::genericDriverInit()
os::Printer::log("GLSL not available.", ELL_INFORMATION); os::Printer::log("GLSL not available.", ELL_INFORMATION);
DriverAttributes->setAttribute("MaxTextures", MaxTextureUnits); DriverAttributes->setAttribute("MaxTextures", MaxTextureUnits);
DriverAttributes->setAttribute("MaxSupportedTextures", MaxSupportedTextures); DriverAttributes->setAttribute("MaxSupportedTextures", MaxSupportedTextures);
// DriverAttributes->setAttribute("MaxLights", MaxLights); DriverAttributes->setAttribute("MaxLights", MaxLights);
DriverAttributes->setAttribute("MaxAnisotropy", MaxAnisotropy); DriverAttributes->setAttribute("MaxAnisotropy", MaxAnisotropy);
DriverAttributes->setAttribute("MaxUserClipPlanes", MaxUserClipPlanes); DriverAttributes->setAttribute("MaxUserClipPlanes", MaxUserClipPlanes);
DriverAttributes->setAttribute("MaxAuxBuffers", MaxAuxBuffers); DriverAttributes->setAttribute("MaxAuxBuffers", MaxAuxBuffers);
......
...@@ -748,6 +748,8 @@ bool COpenGLExtensionHandler::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const ...@@ -748,6 +748,8 @@ bool COpenGLExtensionHandler::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const
case EVDF_BLEND_OPERATIONS: case EVDF_BLEND_OPERATIONS:
return (Version>=120) || FeatureAvailable[IRR_EXT_blend_minmax] || return (Version>=120) || FeatureAvailable[IRR_EXT_blend_minmax] ||
FeatureAvailable[IRR_EXT_blend_subtract] || FeatureAvailable[IRR_EXT_blend_logic_op]; FeatureAvailable[IRR_EXT_blend_subtract] || FeatureAvailable[IRR_EXT_blend_logic_op];
case EVDF_TEXTURE_MATRIX:
return true;
default: default:
return false; return false;
}; };
......
...@@ -361,8 +361,9 @@ CBurningVideoDriver::CBurningVideoDriver(const irr::SIrrlichtCreationParameters& ...@@ -361,8 +361,9 @@ CBurningVideoDriver::CBurningVideoDriver(const irr::SIrrlichtCreationParameters&
DriverAttributes->setAttribute("MaxTextures", 2); DriverAttributes->setAttribute("MaxTextures", 2);
DriverAttributes->setAttribute("MaxIndices", 1<<16); DriverAttributes->setAttribute("MaxIndices", 1<<16);
DriverAttributes->setAttribute("MaxTextureSize", 1024); DriverAttributes->setAttribute("MaxTextureSize", 1024);
DriverAttributes->setAttribute("MaxLights", glsl::gl_MaxLights);
DriverAttributes->setAttribute("MaxTextureLODBias", 16.f); DriverAttributes->setAttribute("MaxTextureLODBias", 16.f);
DriverAttributes->setAttribute("Version", 45); DriverAttributes->setAttribute("Version", 47);
// create triangle renderers // create triangle renderers
......
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