71 lines
1.3 KiB
C++
71 lines
1.3 KiB
C++
/*
|
|
ZRenderBuffer.hpp
|
|
Author: James Russell <jcrussell@762studios.com>
|
|
Created: 04/03/2011
|
|
|
|
Purpose:
|
|
|
|
Buffer that can be used for depth and stencil buffers in frame buffer render targets
|
|
for off-screen rendering.
|
|
|
|
License:
|
|
|
|
TODO
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifndef _ZRENDERBUFFER_HPP
|
|
#define _ZRENDERBUFFER_HPP
|
|
|
|
#include <ZRenderer/ZRendererBuild.hpp>
|
|
|
|
//Enumeration of render buffer type
|
|
enum ZRenderBufferType
|
|
{
|
|
ZRBT_DEPTH16, //16-bit Depth Storage
|
|
ZRBT_DEPTH24, //24-bit Depth Storage
|
|
ZRBT_DEPTH32, //32-bit Depth Storage
|
|
ZRBT_STENCIL8, //8-bit Stencil Storage
|
|
ZRBT_DEPTH24_STENCIL8, //24-bit Depth and 8-bit Stencil
|
|
ZRBT_SIZE
|
|
};
|
|
|
|
class ZRenderBuffer
|
|
{
|
|
public:
|
|
//Virtual Destructor
|
|
virtual ~ZRenderBuffer() { }
|
|
|
|
/*
|
|
public ZRenderBuffer::GetHeight
|
|
|
|
Gets the height value for the render buffer (in pixels).
|
|
|
|
@return (size_t) - height value
|
|
@context (all)
|
|
*/
|
|
virtual size_t GetHeight() = 0;
|
|
|
|
/*
|
|
virtual public ZRenderBuffer::GetType
|
|
|
|
Gets the type of render buffer this is set up to be (depth or stencil).
|
|
|
|
@return (ZRenderBufferType) - the type of render buffer
|
|
@context (all)
|
|
*/
|
|
virtual ZRenderBufferType GetType() = 0;
|
|
|
|
/*
|
|
public ZRenderBuffer::GetWidth
|
|
|
|
Gets the width value for the render buffer (in pixels).
|
|
|
|
@return (size_t) - width value
|
|
@context (all)
|
|
*/
|
|
virtual size_t GetWidth() = 0;
|
|
};
|
|
|
|
#endif |