aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/include/IMaterialRenderer.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/include/IMaterialRenderer.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/include/IMaterialRenderer.h')
-rw-r--r--libraries/irrlicht-1.8/include/IMaterialRenderer.h202
1 files changed, 101 insertions, 101 deletions
diff --git a/libraries/irrlicht-1.8/include/IMaterialRenderer.h b/libraries/irrlicht-1.8/include/IMaterialRenderer.h
index 1828a71..a4e1d20 100644
--- a/libraries/irrlicht-1.8/include/IMaterialRenderer.h
+++ b/libraries/irrlicht-1.8/include/IMaterialRenderer.h
@@ -1,101 +1,101 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __I_MATERIAL_RENDERER_H_INCLUDED__ 5#ifndef __I_MATERIAL_RENDERER_H_INCLUDED__
6#define __I_MATERIAL_RENDERER_H_INCLUDED__ 6#define __I_MATERIAL_RENDERER_H_INCLUDED__
7 7
8#include "IReferenceCounted.h" 8#include "IReferenceCounted.h"
9#include "SMaterial.h" 9#include "SMaterial.h"
10#include "S3DVertex.h" 10#include "S3DVertex.h"
11 11
12namespace irr 12namespace irr
13{ 13{
14namespace video 14namespace video
15{ 15{
16 16
17class IVideoDriver; 17class IVideoDriver;
18class IMaterialRendererServices; 18class IMaterialRendererServices;
19 19
20//! Interface for material rendering. 20//! Interface for material rendering.
21/** Can be used to extend the engine with new materials. Refer to 21/** Can be used to extend the engine with new materials. Refer to
22IVideoDriver::addMaterialRenderer() for more informations on how to extend the 22IVideoDriver::addMaterialRenderer() for more informations on how to extend the
23engine with new materials. */ 23engine with new materials. */
24class IMaterialRenderer : public virtual IReferenceCounted 24class IMaterialRenderer : public virtual IReferenceCounted
25{ 25{
26public: 26public:
27 27
28 //! Called by the IVideoDriver implementation the let the renderer set its needed render states. 28 //! Called by the IVideoDriver implementation the let the renderer set its needed render states.
29 /** This is called during the IVideoDriver::setMaterial() call. 29 /** This is called during the IVideoDriver::setMaterial() call.
30 When overriding this, you can set some renderstates or for example a 30 When overriding this, you can set some renderstates or for example a
31 vertex or pixel shader if you like. 31 vertex or pixel shader if you like.
32 \param material: The new material parameters to be set. The renderer 32 \param material: The new material parameters to be set. The renderer
33 may change the material flags in this material. For example if this 33 may change the material flags in this material. For example if this
34 material does not accept the zbuffer = true, it can set it to false. 34 material does not accept the zbuffer = true, it can set it to false.
35 This is useful, because in the next lastMaterial will be just the 35 This is useful, because in the next lastMaterial will be just the
36 material in this call. 36 material in this call.
37 \param lastMaterial: The material parameters which have been set before 37 \param lastMaterial: The material parameters which have been set before
38 this material. 38 this material.
39 \param resetAllRenderstates: True if all renderstates should really be 39 \param resetAllRenderstates: True if all renderstates should really be
40 reset. This is usually true if the last rendering mode was not a usual 40 reset. This is usually true if the last rendering mode was not a usual
41 3d rendering mode, but for example a 2d rendering mode. 41 3d rendering mode, but for example a 2d rendering mode.
42 You should reset really all renderstates if this is true, no matter if 42 You should reset really all renderstates if this is true, no matter if
43 the lastMaterial had some similar settings. This is used because in 43 the lastMaterial had some similar settings. This is used because in
44 most cases, some common renderstates are not changed if they are 44 most cases, some common renderstates are not changed if they are
45 already there, for example bilinear filtering, wireframe, 45 already there, for example bilinear filtering, wireframe,
46 gouraudshading, lighting, zbuffer, zwriteenable, backfaceculling and 46 gouraudshading, lighting, zbuffer, zwriteenable, backfaceculling and
47 fogenable. 47 fogenable.
48 \param services: Interface providing some methods for changing 48 \param services: Interface providing some methods for changing
49 advanced, internal states of a IVideoDriver. */ 49 advanced, internal states of a IVideoDriver. */
50 virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, 50 virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial,
51 bool resetAllRenderstates, IMaterialRendererServices* services) {} 51 bool resetAllRenderstates, IMaterialRendererServices* services) {}
52 52
53 //! Called every time before a new bunch of geometry is being drawn using this material with for example drawIndexedTriangleList() call. 53 //! Called every time before a new bunch of geometry is being drawn using this material with for example drawIndexedTriangleList() call.
54 /** OnSetMaterial should normally only be called if the renderer decides 54 /** OnSetMaterial should normally only be called if the renderer decides
55 that the renderstates should be changed, it won't be called if for 55 that the renderstates should be changed, it won't be called if for
56 example two drawIndexedTriangleList() will be called with the same 56 example two drawIndexedTriangleList() will be called with the same
57 material set. This method will be called every time. This is useful for 57 material set. This method will be called every time. This is useful for
58 example for materials with shaders, which don't only set new 58 example for materials with shaders, which don't only set new
59 renderstates but also shader constants. 59 renderstates but also shader constants.
60 \param service: Pointer to interface providing methos for setting 60 \param service: Pointer to interface providing methos for setting
61 constants and other things. 61 constants and other things.
62 \param vtxtype: Vertex type with which the next rendering will be done. 62 \param vtxtype: Vertex type with which the next rendering will be done.
63 This can be used by the material renderer to set some specific 63 This can be used by the material renderer to set some specific
64 optimized shaders or if this is an incompatible vertex type for this 64 optimized shaders or if this is an incompatible vertex type for this
65 renderer, to refuse rendering for example. 65 renderer, to refuse rendering for example.
66 \return Returns true if everything is ok, and false if nothing should 66 \return Returns true if everything is ok, and false if nothing should
67 be rendered. The material renderer can choose to return false for 67 be rendered. The material renderer can choose to return false for
68 example if he doesn't support the specified vertex type. This is 68 example if he doesn't support the specified vertex type. This is
69 actually done in D3D8 and D3D9 when using a normal mapped material with 69 actually done in D3D8 and D3D9 when using a normal mapped material with
70 a vertex type other than EVT_TANGENTS. */ 70 a vertex type other than EVT_TANGENTS. */
71 virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) { return true; } 71 virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) { return true; }
72 72
73 //! Called by the IVideoDriver to unset this material. 73 //! Called by the IVideoDriver to unset this material.
74 /** Called during the IVideoDriver::setMaterial() call before the new 74 /** Called during the IVideoDriver::setMaterial() call before the new
75 material will get the OnSetMaterial() call. */ 75 material will get the OnSetMaterial() call. */
76 virtual void OnUnsetMaterial() {} 76 virtual void OnUnsetMaterial() {}
77 77
78 //! Returns if the material is transparent. 78 //! Returns if the material is transparent.
79 /** The scene managment needs to know this 79 /** The scene managment needs to know this
80 for being able to sort the materials by opaque and transparent. */ 80 for being able to sort the materials by opaque and transparent. */
81 virtual bool isTransparent() const { return false; } 81 virtual bool isTransparent() const { return false; }
82 82
83 //! Returns the render capability of the material. 83 //! Returns the render capability of the material.
84 /** Because some more complex materials 84 /** Because some more complex materials
85 are implemented in multiple ways and need special hardware capabilities, it is possible 85 are implemented in multiple ways and need special hardware capabilities, it is possible
86 to query how the current material renderer is performing on the current hardware with this 86 to query how the current material renderer is performing on the current hardware with this
87 function. 87 function.
88 \return Returns 0 if everything is running fine. Any other value is material renderer 88 \return Returns 0 if everything is running fine. Any other value is material renderer
89 specific and means for example that the renderer switched back to a fall back material because 89 specific and means for example that the renderer switched back to a fall back material because
90 it cannot use the latest shaders. More specific examples: 90 it cannot use the latest shaders. More specific examples:
91 Fixed function pipeline materials should return 0 in most cases, parallax mapped 91 Fixed function pipeline materials should return 0 in most cases, parallax mapped
92 material will only return 0 when at least pixel shader 1.4 is available on that machine. */ 92 material will only return 0 when at least pixel shader 1.4 is available on that machine. */
93 virtual s32 getRenderCapability() const { return 0; } 93 virtual s32 getRenderCapability() const { return 0; }
94}; 94};
95 95
96 96
97} // end namespace video 97} // end namespace video
98} // end namespace irr 98} // end namespace irr
99 99
100#endif 100#endif
101 101