2019-12-12 17:32:41 +01:00
|
|
|
// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten
|
|
|
|
// This file is part of the "Irrlicht Engine".
|
|
|
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
|
|
|
|
2021-08-27 17:03:34 +02:00
|
|
|
#ifndef IRR_I_Z2_BUFFER_H_INCLUDED
|
|
|
|
#define IRR_I_Z2_BUFFER_H_INCLUDED
|
2019-12-12 17:32:41 +01:00
|
|
|
|
|
|
|
#include "IReferenceCounted.h"
|
|
|
|
#include "dimension2d.h"
|
|
|
|
#include "S4DVertex.h"
|
|
|
|
|
|
|
|
namespace irr
|
|
|
|
{
|
|
|
|
namespace video
|
|
|
|
{
|
|
|
|
class IDepthBuffer : public virtual IReferenceCounted
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
//! destructor
|
|
|
|
virtual ~IDepthBuffer() {};
|
|
|
|
|
|
|
|
//! clears the zbuffer
|
2020-11-10 19:49:39 +01:00
|
|
|
virtual void clear(f32 value, const interlaced_control interlaced) = 0;
|
2019-12-12 17:32:41 +01:00
|
|
|
|
|
|
|
//! sets the new size of the zbuffer
|
|
|
|
virtual void setSize(const core::dimension2d<u32>& size) = 0;
|
|
|
|
|
|
|
|
//! returns the size of the zbuffer
|
|
|
|
virtual const core::dimension2d<u32>& getSize() const = 0;
|
|
|
|
|
|
|
|
//! locks the zbuffer
|
|
|
|
virtual void* lock() = 0;
|
|
|
|
|
|
|
|
//! unlocks the zbuffer
|
|
|
|
virtual void unlock() = 0;
|
|
|
|
|
|
|
|
//! returns pitch of depthbuffer (in bytes)
|
|
|
|
virtual u32 getPitch() const = 0;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//! creates a ZBuffer
|
|
|
|
IDepthBuffer* createDepthBuffer(const core::dimension2d<u32>& size);
|
|
|
|
|
|
|
|
class IStencilBuffer : public virtual IReferenceCounted
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
//! destructor
|
|
|
|
virtual ~IStencilBuffer() {};
|
|
|
|
|
2020-02-22 21:48:12 +01:00
|
|
|
//! clears the stencil buffer
|
2020-11-10 19:49:39 +01:00
|
|
|
virtual void clear(u32 value, const interlaced_control interlaced) = 0;
|
2019-12-12 17:32:41 +01:00
|
|
|
|
|
|
|
//! sets the new size of the zbuffer
|
|
|
|
virtual void setSize(const core::dimension2d<u32>& size) = 0;
|
|
|
|
|
2020-02-22 21:48:12 +01:00
|
|
|
//! returns the size of the stencil buffer
|
2019-12-12 17:32:41 +01:00
|
|
|
virtual const core::dimension2d<u32>& getSize() const = 0;
|
|
|
|
|
2020-02-22 21:48:12 +01:00
|
|
|
//! locks the stencil buffer
|
2019-12-12 17:32:41 +01:00
|
|
|
virtual void* lock() = 0;
|
|
|
|
|
2020-02-22 21:48:12 +01:00
|
|
|
//! unlocks the stencil buffer
|
2019-12-12 17:32:41 +01:00
|
|
|
virtual void unlock() = 0;
|
|
|
|
|
2020-02-22 21:48:12 +01:00
|
|
|
//! returns pitch of stencil buffer (in bytes)
|
2019-12-12 17:32:41 +01:00
|
|
|
virtual u32 getPitch() const = 0;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//! creates a Stencil Buffer
|
2020-02-22 21:48:12 +01:00
|
|
|
IStencilBuffer* createStencilBuffer(const core::dimension2d<u32>& size, u32 bit);
|
2019-12-12 17:32:41 +01:00
|
|
|
|
|
|
|
} // end namespace video
|
|
|
|
} // end namespace irr
|
|
|
|
|
|
|
|
#endif
|