aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h b/libraries/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h
new file mode 100644
index 0000000..2355e61
--- /dev/null
+++ b/libraries/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