aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.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/CDepthBuffer.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/CDepthBuffer.h')
-rw-r--r--src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h
new file mode 100644
index 0000000..2355e61
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h
@@ -0,0 +1,94 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten
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_Z_BUFFER_H_INCLUDED__
6#define __C_Z_BUFFER_H_INCLUDED__
7
8#include "IDepthBuffer.h"
9
10namespace irr
11{
12namespace video
13{
14
15 class CDepthBuffer : public IDepthBuffer
16 {
17 public:
18
19 //! constructor
20 CDepthBuffer(const core::dimension2d<u32>& size);
21
22 //! destructor
23 virtual ~CDepthBuffer();
24
25 //! clears the zbuffer
26 virtual void clear();
27
28 //! sets the new size of the zbuffer
29 virtual void setSize(const core::dimension2d<u32>& size);
30
31 //! returns the size of the zbuffer
32 virtual const core::dimension2d<u32>& getSize() const;
33
34 //! locks the zbuffer
35 virtual void* lock() { return (void*) Buffer; }
36
37 //! unlocks the zbuffer
38 virtual void unlock() {}
39
40 //! returns pitch of depthbuffer (in bytes)
41 virtual u32 getPitch() const { return Pitch; }
42
43
44 private:
45
46 u8* Buffer;
47 core::dimension2d<u32> Size;
48 u32 TotalSize;
49 u32 Pitch;
50 };
51
52
53 class CStencilBuffer : public IStencilBuffer
54 {
55 public:
56
57 //! constructor
58 CStencilBuffer(const core::dimension2d<u32>& size);
59
60 //! destructor
61 virtual ~CStencilBuffer();
62
63 //! clears the zbuffer
64 virtual void clear();
65
66 //! sets the new size of the zbuffer
67 virtual void setSize(const core::dimension2d<u32>& size);
68
69 //! returns the size of the zbuffer
70 virtual const core::dimension2d<u32>& getSize() const;
71
72 //! locks the zbuffer
73 virtual void* lock() { return (void*) Buffer; }
74
75 //! unlocks the zbuffer
76 virtual void unlock() {}
77
78 //! returns pitch of depthbuffer (in bytes)
79 virtual u32 getPitch() const { return Pitch; }
80
81
82 private:
83
84 u8* Buffer;
85 core::dimension2d<u32> Size;
86 u32 TotalSize;
87 u32 Pitch;
88 };
89
90} // end namespace video
91} // end namespace irr
92
93#endif
94