\hypertarget{class_ogre_1_1_depth_buffer}{}\section{Ogre\+:\+:Depth\+Buffer Class Reference}
\label{class_ogre_1_1_depth_buffer}\index{Ogre\+::\+Depth\+Buffer@{Ogre\+::\+Depth\+Buffer}}


An abstract class that contains a depth/stencil buffer.  




{\ttfamily \#include $<$Ogre\+Depth\+Buffer.\+h$>$}



Inheritance diagram for Ogre\+:\+:Depth\+Buffer\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_depth_buffer__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{group___render_system_ga9854c57374adef41216bae68544a5b7e}{Pool\+Id} \{ \hyperlink{group___render_system_gga9854c57374adef41216bae68544a5b7ea569228ed0fdd8d428a5117026b6d010e}{P\+O\+O\+L\+\_\+\+N\+O\+\_\+\+D\+E\+P\+TH} = 0, 
\hyperlink{group___render_system_gga9854c57374adef41216bae68544a5b7ea2d5409ddce167e1db415f09ee2160440}{P\+O\+O\+L\+\_\+\+M\+A\+N\+U\+A\+L\+\_\+\+U\+S\+A\+GE} = 0, 
\hyperlink{group___render_system_gga9854c57374adef41216bae68544a5b7ea00a687046bfe7a9ebd7f34256d3fbcca}{P\+O\+O\+L\+\_\+\+D\+E\+F\+A\+U\+LT} = 1
 \}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group___render_system_ga90ab98914c730458fccb9780f850b905}{Depth\+Buffer} (\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16} pool\+Id, \hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16} bit\+Depth, \hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32} width, \hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32} height, \hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32} fsaa, const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&fsaa\+Hint, bool manual)
\item 
virtual \hyperlink{group___render_system_ga23ee0fd93e778767b81bebd382bb4306}{$\sim$\+Depth\+Buffer} ()
\item 
virtual void \hyperlink{group___render_system_ga26c4ce1003ddab1ed7e3befecb0888a1}{\+\_\+notify\+Render\+Target\+Attached} (\hyperlink{class_ogre_1_1_render_target}{Render\+Target} $\ast$render\+Target)
\begin{DoxyCompactList}\small\item\em Called when a \hyperlink{class_ogre_1_1_render_target}{Render\+Target} is attaches this \hyperlink{class_ogre_1_1_depth_buffer}{Depth\+Buffer}. \end{DoxyCompactList}\item 
virtual void \hyperlink{group___render_system_ga227b541ef2ae3de53334c10397a08f99}{\+\_\+notify\+Render\+Target\+Detached} (\hyperlink{class_ogre_1_1_render_target}{Render\+Target} $\ast$render\+Target)
\begin{DoxyCompactList}\small\item\em Called when a \hyperlink{class_ogre_1_1_render_target}{Render\+Target} is detaches from this \hyperlink{class_ogre_1_1_depth_buffer}{Depth\+Buffer}. \end{DoxyCompactList}\item 
void \hyperlink{group___render_system_ga7af5c611687492846891914dcac303d2}{\+\_\+set\+Pool\+Id} (\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16} pool\+Id)
\begin{DoxyCompactList}\small\item\em Sets the pool id in which this \hyperlink{class_ogre_1_1_depth_buffer}{Depth\+Buffer} lives. \end{DoxyCompactList}\item 
virtual \hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16} \hyperlink{group___render_system_ga0da54b20b25ac5313fc8c142e8b35168}{get\+Bit\+Depth} () const
\item 
virtual \hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32} \hyperlink{group___render_system_gafb31d279263557b92843f6715ba6e8c2}{get\+Fsaa} () const
\item 
virtual const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \& \hyperlink{group___render_system_ga2d44455830254b7da1058ad542f9a439}{get\+Fsaa\+Hint} () const
\item 
virtual \hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32} \hyperlink{group___render_system_gaf95e6998e74db40257cb2ca5cab4bdf4}{get\+Height} () const
\item 
virtual \hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16} \hyperlink{group___render_system_ga82b30e2ad5de1ac4678fda52ccbaf28f}{get\+Pool\+Id} () const
\begin{DoxyCompactList}\small\item\em Gets the pool id in which this \hyperlink{class_ogre_1_1_depth_buffer}{Depth\+Buffer} lives. \end{DoxyCompactList}\item 
virtual \hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32} \hyperlink{group___render_system_gae5095fe367bf95d08dee2da03810beb2}{get\+Width} () const
\item 
virtual bool \hyperlink{group___render_system_gae959f6dd77e0e8b6aa9b7c6a3d2d3f5d}{is\+Compatible} (\hyperlink{class_ogre_1_1_render_target}{Render\+Target} $\ast$render\+Target) const
\begin{DoxyCompactList}\small\item\em Returns whether the specified \hyperlink{class_ogre_1_1_render_target}{Render\+Target} is compatible with this \hyperlink{class_ogre_1_1_depth_buffer}{Depth\+Buffer} That is, this \hyperlink{class_ogre_1_1_depth_buffer}{Depth\+Buffer} can be attached to that \hyperlink{class_ogre_1_1_render_target}{Render\+Target}. \end{DoxyCompactList}\item 
bool \hyperlink{group___render_system_ga4a3de78684016598642ad2d00e5caa86}{is\+Manual} () const
\begin{DoxyCompactList}\small\item\em Manual Depth\+Buffers are cleared in \hyperlink{class_ogre_1_1_render_system}{Render\+System}\textquotesingle{}s destructor. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
An abstract class that contains a depth/stencil buffer. 

Depth Buffers can be attached to render targets. Note we handle Depth \& Stencil together. \hyperlink{class_ogre_1_1_depth_buffer}{Depth\+Buffer} sharing is handled automatically for you. However, there are times where you want to specifically control depth buffers to achieve certain effects or increase performance. You can control this by hinting \hyperlink{namespace_ogre}{Ogre} with P\+O\+OL I\+Ds. Created depth buffers can live in different pools, or all together in the same one. Usually, a depth buffer can only be attached to a \hyperlink{class_ogre_1_1_render_target}{Render\+Target} if it\textquotesingle{}s dimensions are bigger and have the same bit depth and same multisample settings. Depth Buffers are created automatically for new R\+Ts when needed, and stored in the pool where the \hyperlink{class_ogre_1_1_render_target}{Render\+Target} should have drawn from. By default, all R\+Ts have the \hyperlink{class_ogre_1_1_id}{Id} P\+O\+O\+L\+\_\+\+D\+E\+F\+A\+U\+LT, which means all depth buffers are stored by default in that pool. By choosing a different \hyperlink{class_ogre_1_1_pool}{Pool} \hyperlink{class_ogre_1_1_id}{Id} for a specific \hyperlink{class_ogre_1_1_render_target}{Render\+Target}, that RT will only retrieve depth buffers from {\itshape that} pool, therefore not conflicting with sharing depth buffers with other R\+Ts (such as shadows maps). Setting an RT to P\+O\+O\+L\+\_\+\+M\+A\+N\+U\+A\+L\+\_\+\+U\+S\+A\+GE means \hyperlink{namespace_ogre}{Ogre} won\textquotesingle{}t manage the \hyperlink{class_ogre_1_1_depth_buffer}{Depth\+Buffer} for you (not recommended) R\+Ts with P\+O\+O\+L\+\_\+\+N\+O\+\_\+\+D\+E\+P\+TH are very useful when you don\textquotesingle{}t want to create a \hyperlink{class_ogre_1_1_depth_buffer}{Depth\+Buffer} for it. You can still manually attach a depth buffer though as internally P\+O\+O\+L\+\_\+\+N\+O\+\_\+\+D\+E\+P\+TH \& P\+O\+O\+L\+\_\+\+M\+A\+N\+U\+A\+L\+\_\+\+U\+S\+A\+GE are handled in the same way.

Behavior is consistent across all render systems, if, and only if, the same R\+SC flags are set R\+SC flags that affect this class are\+: R\+S\+C\+\_\+\+R\+T\+T\+\_\+\+M\+A\+I\+N\+\_\+\+D\+E\+P\+T\+H\+B\+U\+F\+F\+E\+R\+\_\+\+A\+T\+T\+A\+C\+H\+A\+B\+LE\+: some A\+P\+Is (ie. Open\+GL w/ F\+BO) don\textquotesingle{}t allow using the main depth buffer for offscreen R\+T\+Ts. When this flag is set, the depth buffer can be shared between the main window and an R\+TT. R\+S\+C\+\_\+\+R\+T\+T\+\_\+\+D\+E\+P\+T\+H\+B\+U\+F\+F\+E\+R\+\_\+\+R\+E\+S\+O\+L\+U\+T\+I\+O\+N\+\_\+\+L\+E\+S\+S\+E\+Q\+U\+AL\+: When this flag isn\textquotesingle{}t set, the depth buffer can only be shared across R\+T\+Ts who have the E\+X\+A\+CT same resolution. When it\textquotesingle{}s set, it can be shared with R\+T\+Ts as long as they have a resolution less or equal than the depth buffer\textquotesingle{}s.

\begin{DoxyRemark}{Remarks}
Design discussion \href{http://www.ogre3d.org/forums/viewtopic.php?f=4&t=53534&p=365582}{\tt http\+://www.\+ogre3d.\+org/forums/viewtopic.\+php?f=4\&t=53534\&p=365582} 
\end{DoxyRemark}
\begin{DoxyAuthor}{Author}
Matias N. Goldberg 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}
1.\+0 
\end{DoxyVersion}


The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_depth_buffer_8h}{Ogre\+Depth\+Buffer.\+h}\end{DoxyCompactItemize}
