]> git.lizzy.rs Git - irrlicht.git/blobdiff - source/Irrlicht/CNullDriver.h
Add back lighting system
[irrlicht.git] / source / Irrlicht / CNullDriver.h
index d3d933c6d1be0588da51daeb91eb9f79ff4c7214..da5b4a6f18946c10928a2bda6b8547ae55074703 100644 (file)
@@ -17,6 +17,7 @@
 #include "CFPSCounter.h"\r
 #include "S3DVertex.h"\r
 #include "SVertexIndex.h"\r
+#include "SLight.h"\r
 #include "SExposedVideoData.h"\r
 #include <list>\r
 \r
@@ -246,6 +247,22 @@ namespace video
                //! very useful method for statistics.\r
                u32 getPrimitiveCountDrawn( u32 param = 0 ) const override;\r
 \r
+               //! deletes all dynamic lights there are\r
+               virtual void deleteAllDynamicLights() override;\r
+\r
+               //! adds a dynamic light, returning an index to the light\r
+               //! \param light: the light data to use to create the light\r
+               //! \return An index to the light, or -1 if an error occurs\r
+               virtual s32 addDynamicLight(const SLight& light) override;\r
+\r
+               //! Turns a dynamic light on or off\r
+               //! \param lightIndex: the index returned by addDynamicLight\r
+               //! \param turnOn: true to turn the light on, false to turn it off\r
+               virtual void turnLightOn(s32 lightIndex, bool turnOn) override;\r
+\r
+               //! returns the maximal amount of dynamic lights the device can handle\r
+               virtual u32 getMaximalDynamicLightAmount() const override;\r
+\r
                //! \return Returns the name of the video driver. Example: In case of the DIRECT3D8\r
                //! driver, it would return "Direct3D8.1".\r
                const wchar_t* getName() const override;\r
@@ -267,18 +284,27 @@ namespace video
                //! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do\r
                //! this: First, draw all geometry. Then use this method, to draw the shadow\r
                //! volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow.\r
-               [[deprecated]] virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles,\r
-                       bool zfail=true, u32 debugDataVisible=0) {}\r
+               virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles,\r
+                       bool zfail=true, u32 debugDataVisible=0) override;\r
 \r
                //! Fills the stencil shadow with color. After the shadow volume has been drawn\r
                //! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this\r
                //! to draw the color of the shadow.\r
-               [[deprecated]] virtual void drawStencilShadow(bool clearStencilBuffer=false,\r
+               virtual void drawStencilShadow(bool clearStencilBuffer=false,\r
                        video::SColor leftUpEdge = video::SColor(0,0,0,0),\r
                        video::SColor rightUpEdge = video::SColor(0,0,0,0),\r
                        video::SColor leftDownEdge = video::SColor(0,0,0,0),\r
-                       video::SColor rightDownEdge = video::SColor(0,0,0,0)) {}\r
+                       video::SColor rightDownEdge = video::SColor(0,0,0,0)) override;\r
+\r
+               //! Returns current amount of dynamic lights set\r
+               //! \return Current amount of dynamic lights set\r
+               virtual u32 getDynamicLightCount() const override;\r
 \r
+               //! Returns light data which was previously set with IVideDriver::addDynamicLight().\r
+               //! \param idx: Zero based index of the light. Must be greater than 0 and smaller\r
+               //! than IVideoDriver()::getDynamicLightCount.\r
+               //! \return Light data.\r
+               virtual const SLight& getDynamicLight(u32 idx) const override;\r
 \r
                //! Removes a texture from the texture cache and deletes it, freeing lot of\r
                //! memory.\r
@@ -793,6 +819,7 @@ namespace video
 \r
                core::array<video::IImageLoader*> SurfaceLoader;\r
                core::array<video::IImageWriter*> SurfaceWriter;\r
+               core::array<SLight> Lights;\r
                core::array<SMaterialRenderer> MaterialRenderers;\r
 \r
                std::list<SHWBufferLink*> HWBufferList;\r