]> git.lizzy.rs Git - irrlicht.git/blobdiff - include/IVideoDriver.h
IVideoDriver::setMaterialRendererName now using u32 for index like other similar...
[irrlicht.git] / include / IVideoDriver.h
index a084d403c1a7af3032bacb675d6114ecdcd51274..ed4e6fa55c28191026ea4ad3400645c10884d977 100644 (file)
@@ -25,7 +25,6 @@ namespace irr
 namespace io\r
 {\r
        class IAttributes;\r
-       struct SAttributeReadWriteOptions;\r
        class IReadFile;\r
        class IWriteFile;\r
 } // end namespace io\r
@@ -42,7 +41,6 @@ namespace video
        struct S3DVertex;\r
        struct S3DVertex2TCoords;\r
        struct S3DVertexTangents;\r
-       struct SLight;\r
        class IImageLoader;\r
        class IImageWriter;\r
        class IMaterialRenderer;\r
@@ -58,32 +56,11 @@ namespace video
                ETS_WORLD,\r
                //! Projection transformation\r
                ETS_PROJECTION,\r
-               //! Texture transformation\r
+               //! Texture 0 transformation\r
+               //! Use E_TRANSFORMATION_STATE(ETS_TEXTURE_0 + texture_number) to access other texture transformations\r
                ETS_TEXTURE_0,\r
-               //! Texture transformation\r
-               ETS_TEXTURE_1,\r
-               //! Texture transformation\r
-               ETS_TEXTURE_2,\r
-               //! Texture transformation\r
-               ETS_TEXTURE_3,\r
-#if _IRR_MATERIAL_MAX_TEXTURES_>4\r
-               //! Texture transformation\r
-               ETS_TEXTURE_4,\r
-#if _IRR_MATERIAL_MAX_TEXTURES_>5\r
-               //! Texture transformation\r
-               ETS_TEXTURE_5,\r
-#if _IRR_MATERIAL_MAX_TEXTURES_>6\r
-               //! Texture transformation\r
-               ETS_TEXTURE_6,\r
-#if _IRR_MATERIAL_MAX_TEXTURES_>7\r
-               //! Texture transformation\r
-               ETS_TEXTURE_7,\r
-#endif\r
-#endif\r
-#endif\r
-#endif\r
                //! Only used internally\r
-               ETS_COUNT = ETS_TEXTURE_0 + _IRR_MATERIAL_MAX_TEXTURES_\r
+               ETS_COUNT = ETS_TEXTURE_0 + MATERIAL_MAX_TEXTURES\r
        };\r
 \r
        //! Special render targets, which usually map to dedicated hardware\r
@@ -333,7 +310,7 @@ namespace video
                _IRR_DEPRECATED_ ITexture* addTexture(const io::path& name, IImage* image, void* mipmapData)\r
                {\r
                        if (image)\r
-                               image->setMipMapsData(mipmapData, false, true);\r
+                               image->setMipMapsData(mipmapData, false);\r
 \r
                        return addTexture(name, image);\r
                }\r
@@ -483,7 +460,7 @@ namespace video
                example in picture edit programs. To avoid this problem, you\r
                could use the makeColorKeyTexture method, which takes the\r
                position of a pixel instead a color value.\r
-               \param zeroTexels \deprecated If set to true, then any texels that match\r
+               \param zeroTexels (deprecated) If set to true, then any texels that match\r
                the color key will have their color, as well as their alpha, set to zero\r
                (i.e. black). This behavior matches the legacy (buggy) behavior prior\r
                to release 1.5 and is provided for backwards compatibility only.\r
@@ -500,7 +477,7 @@ namespace video
                \param colorKeyPixelPos Position of a pixel with the color key\r
                color. Every texel with this color will become fully transparent as\r
                described above.\r
-               \param zeroTexels \deprecated If set to true, then any texels that match\r
+               \param zeroTexels (deprecated) If set to true, then any texels that match\r
                the color key will have their color, as well as their alpha, set to zero\r
                (i.e. black). This behavior matches the legacy (buggy) behavior prior\r
                to release 1.5 and is provided for backwards compatibility only.\r
@@ -509,20 +486,6 @@ namespace video
                                core::position2d<s32> colorKeyPixelPos,\r
                                bool zeroTexels = false) const =0;\r
 \r
-               //! Creates a normal map from a height map texture.\r
-               /** As input is considered to be a height map the texture is read like:\r
-               - For a 32-bit texture only the red channel is regarded\r
-               - For a 16-bit texture the rgb-values are averaged.\r
-               Output channels red/green for X/Y and blue for up (Z).\r
-               For a 32-bit texture we store additionally the height value in the\r
-               alpha channel. This value is used by the video::EMT_PARALLAX_MAP_SOLID\r
-               material and similar materials.\r
-               On the borders the texture is considered to repeat.\r
-               \param texture Height map texture which is converted to a normal map.\r
-               \param amplitude Constant value by which the height\r
-               information is multiplied.*/\r
-               virtual void makeNormalMapTexture(video::ITexture* texture, f32 amplitude=1.0f) const =0;\r
-\r
                //! Set a render target.\r
                /** This will only work if the driver supports the\r
                EVDF_RENDER_TO_TARGET feature, which can be queried with\r
@@ -1068,33 +1031,6 @@ namespace video
                \return Amount of primitives drawn in the last frame. */\r
                virtual u32 getPrimitiveCountDrawn( u32 mode =0 ) const =0;\r
 \r
-               //! Deletes all dynamic lights which were previously added with addDynamicLight().\r
-               virtual void deleteAllDynamicLights() =0;\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) =0;\r
-\r
-               //! Returns the maximal amount of dynamic lights the device can handle\r
-               /** \return Maximal amount of dynamic lights. */\r
-               virtual u32 getMaximalDynamicLightAmount() const =0;\r
-\r
-               //! Returns amount of dynamic lights currently set\r
-               /** \return Amount of dynamic lights currently set */\r
-               virtual u32 getDynamicLightCount() const =0;\r
-\r
-               //! Returns light data which was previously set by IVideoDriver::addDynamicLight().\r
-               /** \param idx Zero based index of the light. Must be 0 or\r
-               greater and smaller than IVideoDriver::getDynamicLightCount.\r
-               \return Light data. */\r
-               virtual const SLight& getDynamicLight(u32 idx) const =0;\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) =0;\r
-\r
                //! Gets name of this video driver.\r
                /** \return Returns the name of the video driver, e.g. in case\r
                of the Direct3D8 driver, it would return "Direct3D 8.1". */\r
@@ -1343,7 +1279,7 @@ namespace video
                E_MATERIAL_TYPE enum or a value which was returned by\r
                addMaterialRenderer().\r
                \param name: New name of the material renderer. */\r
-               virtual void setMaterialRendererName(s32 idx, const c8* name) =0;\r
+               virtual void setMaterialRendererName(u32 idx, const c8* name) =0;\r
 \r
                //! Swap the material renderers used for certain id's\r
                /** Swap the IMaterialRenderers responsible for rendering specific\r
@@ -1355,28 +1291,6 @@ namespace video
                                  When false the names will stay at the original index */\r
                virtual void swapMaterialRenderers(u32 idx1, u32 idx2, bool swapNames=true) = 0;\r
 \r
-               //! Creates material attributes list from a material\r
-               /** This method is useful for serialization and more.\r
-               Please note that the video driver will use the material\r
-               renderer names from getMaterialRendererName() to write out the\r
-               material type name, so they should be set before.\r
-               \param material The material to serialize.\r
-               \param options Additional options which might influence the\r
-               serialization.\r
-               \return The io::IAttributes container holding the material\r
-               properties. */\r
-               virtual io::IAttributes* createAttributesFromMaterial(const video::SMaterial& material,\r
-                       io::SAttributeReadWriteOptions* options=0) =0;\r
-\r
-               //! Fills an SMaterial structure from attributes.\r
-               /** Please note that for setting material types of the\r
-               material, the video driver will need to query the material\r
-               renderers for their names, so all non built-in materials must\r
-               have been created before calling this method.\r
-               \param outMaterial The material to set the properties for.\r
-               \param attributes The attributes to read from. */\r
-               virtual void fillMaterialStructureFromAttributes(video::SMaterial& outMaterial, io::IAttributes* attributes) =0;\r
-\r
                //! Returns driver and operating system specific data about the IVideoDriver.\r
                /** This method should only be used if the engine should be\r
                extended without having to modify the source of the engine.\r
@@ -1423,7 +1337,7 @@ namespace video
                you have to render some special things, you can clear the\r
                zbuffer during the rendering process with this method any time.\r
                */\r
-               _IRR_DEPRECATED_ void clearZBuffer()\r
+               void clearZBuffer()\r
                {\r
                        clearBuffers(ECBF_DEPTH, SColor(255,0,0,0), 1.f, 0);\r
                }\r