2019-12-12 17:32:41 +01:00
|
|
|
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
|
|
|
// This file is part of the "Irrlicht Engine".
|
|
|
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
|
|
|
|
2021-08-27 17:55:04 +02:00
|
|
|
#ifndef IRR_C_Z_BUFFER_H_INCLUDED
|
|
|
|
#define IRR_C_Z_BUFFER_H_INCLUDED
|
2019-12-12 17:32:41 +01:00
|
|
|
|
|
|
|
#include "IZBuffer.h"
|
|
|
|
|
|
|
|
namespace irr
|
|
|
|
{
|
|
|
|
namespace video
|
|
|
|
{
|
|
|
|
|
|
|
|
class CZBuffer : public IZBuffer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
//! constructor
|
|
|
|
CZBuffer(const core::dimension2d<u32>& size);
|
|
|
|
|
|
|
|
//! destructor
|
|
|
|
virtual ~CZBuffer();
|
|
|
|
|
|
|
|
//! clears the zbuffer
|
2021-08-27 14:55:10 +02:00
|
|
|
virtual void clear() IRR_OVERRIDE;
|
2019-12-12 17:32:41 +01:00
|
|
|
|
|
|
|
//! sets the new size of the zbuffer
|
2021-08-27 14:55:10 +02:00
|
|
|
virtual void setSize(const core::dimension2d<u32>& size) IRR_OVERRIDE;
|
2019-12-12 17:32:41 +01:00
|
|
|
|
|
|
|
//! returns the size of the zbuffer
|
2021-08-27 14:55:10 +02:00
|
|
|
virtual const core::dimension2d<u32>& getSize() const IRR_OVERRIDE;
|
2019-12-12 17:32:41 +01:00
|
|
|
|
|
|
|
//! locks the zbuffer
|
2021-08-27 14:55:10 +02:00
|
|
|
virtual TZBufferType* lock() IRR_OVERRIDE;
|
2019-12-12 17:32:41 +01:00
|
|
|
|
|
|
|
//! unlocks the zbuffer
|
2021-08-27 14:55:10 +02:00
|
|
|
virtual void unlock() IRR_OVERRIDE;
|
2019-12-12 17:32:41 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
TZBufferType* Buffer;
|
|
|
|
TZBufferType* BufferEnd;
|
|
|
|
core::dimension2d<u32> Size;
|
|
|
|
s32 TotalSize;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace video
|
|
|
|
} // end namespace irr
|
|
|
|
|
|
|
|
#endif
|