aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/COpenGLDriver.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Irrlicht/COpenGLDriver.h')
-rw-r--r--source/Irrlicht/COpenGLDriver.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/source/Irrlicht/COpenGLDriver.h b/source/Irrlicht/COpenGLDriver.h
index c60d2ba..7121a4d 100644
--- a/source/Irrlicht/COpenGLDriver.h
+++ b/source/Irrlicht/COpenGLDriver.h
@@ -209,6 +209,22 @@ namespace video
//! driver, it would return "Direct3D8.1".
const wchar_t* getName() const override;
+ //! deletes all dynamic lights there are
+ virtual void deleteAllDynamicLights() override;
+
+ //! adds a dynamic light, returning an index to the light
+ //! \param light: the light data to use to create the light
+ //! \return An index to the light, or -1 if an error occurs
+ virtual s32 addDynamicLight(const SLight& light) override;
+
+ //! 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
+ virtual void turnLightOn(s32 lightIndex, bool turnOn) override;
+
+ //! returns the maximal amount of dynamic lights the device can handle
+ virtual u32 getMaximalDynamicLightAmount() const override;
+
//! Sets the dynamic ambient light color. The default color is
//! (0,0,0,0) which means it is dark.
//! \param color: New color of the ambient light.
@@ -480,6 +496,19 @@ namespace video
SIrrlichtCreationParameters Params;
+ //! All the lights that have been requested; a hardware limited
+ //! number of them will be used at once.
+ struct RequestedLight
+ {
+ RequestedLight(SLight const & lightData)
+ : LightData(lightData), HardwareLightIndex(-1), DesireToBeOn(true) { }
+
+ SLight LightData;
+ s32 HardwareLightIndex; // GL_LIGHT0 - GL_LIGHT7
+ bool DesireToBeOn;
+ };
+ core::array<RequestedLight> RequestedLights;
+
//! Built-in 2D quad for 2D rendering.
S3DVertex Quad2DVertices[4];
static const u16 Quad2DIndices[4];