aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftware2MaterialRenderer.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-03-28 22:28:34 +1000
committerDavid Walter Seikel2016-03-28 22:28:34 +1000
commit7028cbe09c688437910a25623098762bf0fa592d (patch)
tree10b5af58277d9880380c2251f109325542c4e6eb /src/others/irrlicht-1.8.1/source/Irrlicht/CSoftware2MaterialRenderer.h
parentMove lemon to the src/others directory. (diff)
downloadSledjHamr-7028cbe09c688437910a25623098762bf0fa592d.zip
SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.gz
SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.bz2
SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.xz
Move Irrlicht to src/others.
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/CSoftware2MaterialRenderer.h')
-rw-r--r--src/others/irrlicht-1.8.1/source/Irrlicht/CSoftware2MaterialRenderer.h118
1 files changed, 118 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftware2MaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftware2MaterialRenderer.h
new file mode 100644
index 0000000..8093613
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftware2MaterialRenderer.h
@@ -0,0 +1,118 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __C_SOFTWARE2_MATERIAL_RENDERER_H_INCLUDED__
6#define __C_SOFTWARE2_MATERIAL_RENDERER_H_INCLUDED__
7
8#include "SoftwareDriver2_compile_config.h"
9
10#include "IMaterialRenderer.h"
11#include "CSoftwareDriver2.h"
12
13namespace irr
14{
15namespace video
16{
17
18//! Base class for all internal Software2 material renderers
19class CSoftware2MaterialRenderer : public IMaterialRenderer
20{
21public:
22
23 //! Constructor
24 CSoftware2MaterialRenderer(video::CBurningVideoDriver* driver)
25 : Driver(driver)
26 {
27 }
28
29protected:
30
31 video::CBurningVideoDriver* Driver;
32};
33
34//! solid material renderer
35class CSoftware2MaterialRenderer_SOLID : public CSoftware2MaterialRenderer
36{
37public:
38 CSoftware2MaterialRenderer_SOLID ( video::CBurningVideoDriver* driver )
39 :CSoftware2MaterialRenderer ( driver ) {}
40
41 //! Returns if the material is transparent.
42 virtual bool isTransparent() const
43 {
44 return false;
45 }
46
47};
48
49
50
51//! Transparent material renderer
52class CSoftware2MaterialRenderer_TRANSPARENT_ADD_COLOR : public CSoftware2MaterialRenderer
53{
54public:
55 CSoftware2MaterialRenderer_TRANSPARENT_ADD_COLOR ( video::CBurningVideoDriver* driver )
56 : CSoftware2MaterialRenderer ( driver ) {}
57
58
59 //! Returns if the material is transparent.
60 virtual bool isTransparent() const
61 {
62 return true;
63 }
64
65};
66
67//! unsupported material renderer
68class CSoftware2MaterialRenderer_UNSUPPORTED : public CSoftware2MaterialRenderer
69{
70public:
71 CSoftware2MaterialRenderer_UNSUPPORTED ( video::CBurningVideoDriver* driver )
72 : CSoftware2MaterialRenderer ( driver ) {}
73
74 virtual s32 getRenderCapability() const { return 1; }
75
76};
77
78//! unsupported material renderer
79class CBurningShader_REFERENCE : public CSoftware2MaterialRenderer
80{
81public:
82 CBurningShader_REFERENCE ( video::CBurningVideoDriver* driver )
83 : CSoftware2MaterialRenderer ( driver ) {}
84
85 virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial,
86 bool resetAllRenderstates, IMaterialRendererServices* services)
87 {
88 }
89
90 virtual void OnUnsetMaterial()
91 {
92 }
93
94 virtual bool isTransparent() const
95 {
96 return false;
97 }
98
99 virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype)
100 {
101 return true;
102 };
103
104
105 virtual s32 getRenderCapability() const
106 {
107 return 1;
108 }
109
110};
111
112
113
114} // end namespace video
115} // end namespace irr
116
117#endif
118