aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/CNullDriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Irrlicht/CNullDriver.cpp')
-rw-r--r--source/Irrlicht/CNullDriver.cpp75
1 files changed, 75 insertions, 0 deletions
diff --git a/source/Irrlicht/CNullDriver.cpp b/source/Irrlicht/CNullDriver.cpp
index 6ef7c17..e829c56 100644
--- a/source/Irrlicht/CNullDriver.cpp
+++ b/source/Irrlicht/CNullDriver.cpp
@@ -55,6 +55,7 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& scre
DriverAttributes = new io::CAttributes();
DriverAttributes->addInt("MaxTextures", MATERIAL_MAX_TEXTURES);
DriverAttributes->addInt("MaxSupportedTextures", MATERIAL_MAX_TEXTURES);
+ DriverAttributes->addInt("MaxLights", getMaximalDynamicLightAmount());
DriverAttributes->addInt("MaxAnisotropy", 1);
// DriverAttributes->addInt("MaxUserClipPlanes", 0);
// DriverAttributes->addInt("MaxAuxBuffers", 0);
@@ -865,6 +866,80 @@ const wchar_t* CNullDriver::getName() const
}
+
+//! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do
+//! this: First, draw all geometry. Then use this method, to draw the shadow
+//! volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow.
+void CNullDriver::drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail, u32 debugDataVisible)
+{
+}
+
+
+//! Fills the stencil shadow with color. After the shadow volume has been drawn
+//! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this
+//! to draw the color of the shadow.
+void CNullDriver::drawStencilShadow(bool clearStencilBuffer,
+ video::SColor leftUpEdge, video::SColor rightUpEdge,
+ video::SColor leftDownEdge, video::SColor rightDownEdge)
+{
+}
+
+
+//! deletes all dynamic lights there are
+void CNullDriver::deleteAllDynamicLights()
+{
+ Lights.set_used(0);
+}
+
+
+//! adds a dynamic light
+s32 CNullDriver::addDynamicLight(const SLight& light)
+{
+ Lights.push_back(light);
+ return Lights.size() - 1;
+}
+
+//! Turns a dynamic light on or off
+//! \param lightIndex: the index returned by addDynamicLight
+//! \param turnOn: true to turn the light on, false to turn it off
+void CNullDriver::turnLightOn(s32 lightIndex, bool turnOn)
+{
+ // Do nothing
+}
+
+
+//! returns the maximal amount of dynamic lights the device can handle
+u32 CNullDriver::getMaximalDynamicLightAmount() const
+{
+ return 0;
+}
+
+
+//! Returns current amount of dynamic lights set
+//! \return Current amount of dynamic lights set
+u32 CNullDriver::getDynamicLightCount() const
+{
+ return Lights.size();
+}
+
+
+//! Returns light data which was previously set by IVideoDriver::addDynamicLight().
+//! \param idx: Zero based index of the light. Must be greater than 0 and smaller
+//! than IVideoDriver()::getDynamicLightCount.
+//! \return Light data.
+const SLight& CNullDriver::getDynamicLight(u32 idx) const
+{
+ if ( idx < Lights.size() )
+ return Lights[idx];
+ else
+ {
+ _IRR_DEBUG_BREAK_IF(true)
+ static const SLight dummy;
+ return dummy;
+ }
+}
+
+
//! Creates a boolean alpha channel of the texture based of an color key.
void CNullDriver::makeColorKeyTexture(video::ITexture* texture,
video::SColor color,