#ifndef __C_Z_BUFFER_H_INCLUDED__
#define __C_Z_BUFFER_H_INCLUDED__
#include "IDepthBuffer.h"
namespace irr
{
namespace video
{
class CDepthBuffer : public IDepthBuffer
{
public:
CDepthBuffer(const core::dimension2d<u32>& size);
virtual ~CDepthBuffer();
virtual void clear();
virtual void setSize(const core::dimension2d<u32>& size);
virtual const core::dimension2d<u32>& getSize() const;
virtual void* lock() { return (void*) Buffer; }
virtual void unlock() {}
virtual u32 getPitch() const { return Pitch; }
private:
u8* Buffer;
core::dimension2d<u32> Size;
u32 TotalSize;
u32 Pitch;
};
class CStencilBuffer : public IStencilBuffer
{
public:
CStencilBuffer(const core::dimension2d<u32>& size);
virtual ~CStencilBuffer();
virtual void clear();
virtual void setSize(const core::dimension2d<u32>& size);
virtual const core::dimension2d<u32>& getSize() const;
virtual void* lock() { return (void*) Buffer; }
virtual void unlock() {}
virtual u32 getPitch() const { return Pitch; }
private:
u8* Buffer;
core::dimension2d<u32> Size;
u32 TotalSize;
u32 Pitch;
};
}
}
#endif