diff options
author | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
commit | f9158592e1478b2013afc7041d9ed041cf2d2f4a (patch) | |
tree | b16e389d7988700e21b4c9741044cefa536dcbae /libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp | |
parent | Libraries readme updated with change markers and more of the Irrlicht changes. (diff) | |
download | SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.zip SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.gz SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.bz2 SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.xz |
Update Irrlicht to 1.8.1. Include actual change markers this time. lol
Diffstat (limited to '')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp b/libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp deleted file mode 100644 index 6403efa..0000000 --- a/libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
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 | #include "IrrCompileConfig.h" | ||
6 | #include "CZBuffer.h" | ||
7 | #include "irrString.h" | ||
8 | |||
9 | #ifdef _IRR_COMPILE_WITH_SOFTWARE_ | ||
10 | |||
11 | namespace irr | ||
12 | { | ||
13 | namespace video | ||
14 | { | ||
15 | |||
16 | |||
17 | //! constructor | ||
18 | CZBuffer::CZBuffer(const core::dimension2d<u32>& size) | ||
19 | : Buffer(0), BufferEnd(0), Size(0,0), TotalSize(0) | ||
20 | { | ||
21 | #ifdef _DEBUG | ||
22 | setDebugName("CZBuffer"); | ||
23 | #endif | ||
24 | |||
25 | setSize(size); | ||
26 | } | ||
27 | |||
28 | |||
29 | |||
30 | //! destructor | ||
31 | CZBuffer::~CZBuffer() | ||
32 | { | ||
33 | delete [] Buffer; | ||
34 | } | ||
35 | |||
36 | |||
37 | |||
38 | //! clears the zbuffer | ||
39 | void CZBuffer::clear() | ||
40 | { | ||
41 | memset(Buffer, 0, (BufferEnd-Buffer)*sizeof(TZBufferType)); | ||
42 | } | ||
43 | |||
44 | |||
45 | |||
46 | //! sets the new size of the zbuffer | ||
47 | void CZBuffer::setSize(const core::dimension2d<u32>& size) | ||
48 | { | ||
49 | if (size == Size) | ||
50 | return; | ||
51 | |||
52 | Size = size; | ||
53 | |||
54 | delete [] Buffer; | ||
55 | |||
56 | TotalSize = size.Width * size.Height; | ||
57 | Buffer = new TZBufferType[TotalSize]; | ||
58 | BufferEnd = Buffer + TotalSize; | ||
59 | } | ||
60 | |||
61 | |||
62 | |||
63 | //! returns the size of the zbuffer | ||
64 | const core::dimension2d<u32>& CZBuffer::getSize() const | ||
65 | { | ||
66 | return Size; | ||
67 | } | ||
68 | |||
69 | |||
70 | |||
71 | //! locks the zbuffer | ||
72 | TZBufferType* CZBuffer::lock() | ||
73 | { | ||
74 | return Buffer; | ||
75 | } | ||
76 | |||
77 | |||
78 | |||
79 | //! unlocks the zbuffer | ||
80 | void CZBuffer::unlock() | ||
81 | { | ||
82 | } | ||
83 | |||
84 | } // end namespace video | ||
85 | } // end namespace irr | ||
86 | |||
87 | #endif // _IRR_COMPILE_WITH_SOFTWARE_ | ||
88 | |||
89 | namespace irr | ||
90 | { | ||
91 | namespace video | ||
92 | { | ||
93 | |||
94 | //! creates a ZBuffer | ||
95 | IZBuffer* createZBuffer(const core::dimension2d<u32>& size) | ||
96 | { | ||
97 | #ifdef _IRR_COMPILE_WITH_SOFTWARE_ | ||
98 | return new CZBuffer(size); | ||
99 | #else | ||
100 | return 0; | ||
101 | #endif // _IRR_COMPILE_WITH_SOFTWARE_ | ||
102 | } | ||
103 | |||
104 | |||
105 | } // end namespace video | ||
106 | } // end namespace irr | ||
107 | |||
108 | |||
109 | |||