\hypertarget{class_ogre_1_1_hardware_counter_buffer}{}\doxysection{Ogre\+::Hardware\+Counter\+Buffer Class Reference}
\label{class_ogre_1_1_hardware_counter_buffer}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}


Specialisation of \mbox{\hyperlink{class_ogre_1_1_hardware_buffer}{Hardware\+Buffer}} for a counter buffer.  




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



Inheritance diagram for Ogre\+::Hardware\+Counter\+Buffer\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_hardware_counter_buffer__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0f}{Lock\+Options}} \{ \newline
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0fae11601d29cd56aad7ea7a1b23a688b0e}{H\+B\+L\+\_\+\+N\+O\+R\+M\+AL}}, 
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0fa176ad39ac15fc0a6028d820a6fe228ae}{H\+B\+L\+\_\+\+D\+I\+S\+C\+A\+RD}}, 
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0faa364c1511514cd4d7ee1e7092eb41288}{H\+B\+L\+\_\+\+R\+E\+A\+D\+\_\+\+O\+N\+LY}}, 
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0fa32a2f7b1c3430cc9c3f0f665934d0c4a}{H\+B\+L\+\_\+\+N\+O\+\_\+\+O\+V\+E\+R\+W\+R\+I\+TE}}, 
\newline
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0faf4acad29e302c7c02ce72c3fce8990df}{H\+B\+L\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY}}
 \}
\begin{DoxyCompactList}\small\item\em Locking options. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630}{Usage}} \{ \newline
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a6f26f67ab31d60248314c9c6c77c9edb}{H\+B\+U\+\_\+\+S\+T\+A\+T\+IC}} = 1, 
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630abec61c14b13652a06566a79afd6f7518}{H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+IC}} = 2, 
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a2fe20ff00e9acb928a2d9680f0c505e2}{H\+B\+U\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY}} = 4, 
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a246699879ba7647973a2d8ed86acf76f}{H\+B\+U\+\_\+\+D\+I\+S\+C\+A\+R\+D\+A\+B\+LE}} = 8, 
\newline
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a5ffbb339becd31435c5f616be4c28996}{H\+B\+U\+\_\+\+S\+T\+A\+T\+I\+C\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY}} = H\+B\+U\+\_\+\+S\+T\+A\+T\+IC $\vert$ H\+B\+U\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY, 
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630aa0c82d1b27d6cc04e4b5f6d47a22a74c}{H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+I\+C\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY}} = H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+IC $\vert$ H\+B\+U\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY, 
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a29ff2e0fd2b408359e84291b27282516}{H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+I\+C\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+L\+Y\+\_\+\+D\+I\+S\+C\+A\+R\+D\+A\+B\+LE}} = H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+I\+C\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY $\vert$ H\+B\+U\+\_\+\+D\+I\+S\+C\+A\+R\+D\+A\+B\+LE
 \}
\begin{DoxyCompactList}\small\item\em Enums describing buffer usage; not mutually exclusive. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group___render_system_ga2ce814facccaef7be68c6203dce38967}{Hardware\+Counter\+Buffer}} (\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_manager_base}{Hardware\+Buffer\+Manager\+Base}} $\ast$mgr, size\+\_\+t size\+Bytes, \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630}{Hardware\+Buffer\+::\+Usage}} usage, bool use\+Shadow\+Buffer=false, const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&name=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em Should be called by \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_manager}{Hardware\+Buffer\+Manager}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group___render_system_gae857f97b56f610cea3583c5b01bda49c}{$\sim$\+Hardware\+Counter\+Buffer}} ()
\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a344c52f2214eaff097d5fbc390e7684b}{\+\_\+update\+From\+Shadow}} (void)
\begin{DoxyCompactList}\small\item\em Updates the real buffer from the shadow buffer, if required. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a0bf3147b1f99a81dd84fb7b978c4686d}{copy\+Data}} (\mbox{\hyperlink{class_ogre_1_1_hardware_buffer}{Hardware\+Buffer}} \&src\+Buffer)
\begin{DoxyCompactList}\small\item\em Copy all data from another buffer into this one. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a721891f0c0bd391dd5848c8a585ba054}{copy\+Data}} (\mbox{\hyperlink{class_ogre_1_1_hardware_buffer}{Hardware\+Buffer}} \&src\+Buffer, size\+\_\+t src\+Offset, size\+\_\+t dst\+Offset, size\+\_\+t length, bool discard\+Whole\+Buffer=false)
\begin{DoxyCompactList}\small\item\em Copy data from another buffer into this one. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_manager_base}{Hardware\+Buffer\+Manager\+Base}} $\ast$ \mbox{\hyperlink{group___render_system_ga55b7b464be821ef2536e2470b15865c9}{get\+Manager}} () const
\begin{DoxyCompactList}\small\item\em Return the manager of this buffer, if any. \end{DoxyCompactList}\item 
const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \& \mbox{\hyperlink{group___render_system_gacbd3b457eeca52094cf44fb8b3f853d6}{get\+Name}} () const
\item 
size\+\_\+t \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a9194c7e8b536f4825b15b9e6a6912ce8}{get\+Size\+In\+Bytes}} (void) const
\begin{DoxyCompactList}\small\item\em Returns the size of this buffer in bytes. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630}{Usage}} \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a9c5ee6468dcb269e422e213b82726e4f}{get\+Usage}} (void) const
\begin{DoxyCompactList}\small\item\em Returns the Usage flags with which this buffer was created. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a40a623d95552d9b1858e5c300a3ad68c}{has\+Shadow\+Buffer}} (void) const
\begin{DoxyCompactList}\small\item\em Returns whether this buffer has a system memory shadow for quicker reading. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a7c874c6b30c39aa38ae0d6abe2ba42bc}{is\+Locked}} (void) const
\begin{DoxyCompactList}\small\item\em Returns whether or not this buffer is currently locked. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a0e1881a6106c59d5aae27589ca1bca5d}{is\+System\+Memory}} (void) const
\begin{DoxyCompactList}\small\item\em Returns whether this buffer is held in system memory. \end{DoxyCompactList}\item 
void $\ast$ \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a93b204642190e611bc226ea08d29160e}{lock}} (\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0f}{Lock\+Options}} options)
\begin{DoxyCompactList}\small\item\em This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. \end{DoxyCompactList}\item 
virtual void $\ast$ \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ab1caebda1f7442706df97531c2d90aaf}{lock}} (size\+\_\+t offset, size\+\_\+t length, \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0f}{Lock\+Options}} options)
\begin{DoxyCompactList}\small\item\em Lock the buffer for (potentially) reading / writing. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a552f466b57ba77f29e083266d4688765}{read\+Data}} (size\+\_\+t offset, size\+\_\+t length, void $\ast$p\+Dest)=0
\begin{DoxyCompactList}\small\item\em Reads data from the buffer and places it in the memory pointed to by p\+Dest. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a688e1be4a913099ce5e06172771e2d45}{suppress\+Hardware\+Update}} (bool suppress)
\begin{DoxyCompactList}\small\item\em \mbox{\hyperlink{class_ogre_1_1_pass}{Pass}} true to suppress hardware upload of shadow buffer changes. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a64ddd429ff2c8ac4f0cca5decb5c6757}{unlock}} (void)
\begin{DoxyCompactList}\small\item\em Releases the lock on this buffer. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_a8c313688a0df3c28a36738c31fcbc3ee}{write\+Data}} (size\+\_\+t offset, size\+\_\+t length, const void $\ast$p\+Source, bool discard\+Whole\+Buffer=false)=0
\begin{DoxyCompactList}\small\item\em Writes data to the buffer from an area of system memory; note that you must ensure that your buffer is big enough. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Specialisation of \mbox{\hyperlink{class_ogre_1_1_hardware_buffer}{Hardware\+Buffer}} for a counter buffer. 

\doxysubsection{Member Enumeration Documentation}
\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630}\label{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!Usage@{Usage}}
\index{Usage@{Usage}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{Usage}{Usage}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630}{Ogre\+::\+Hardware\+Buffer\+::\+Usage}}\hspace{0.3cm}{\ttfamily [inherited]}}



Enums describing buffer usage; not mutually exclusive. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{HBU\_STATIC@{HBU\_STATIC}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!HBU\_STATIC@{HBU\_STATIC}}}\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a6f26f67ab31d60248314c9c6c77c9edb}\label{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a6f26f67ab31d60248314c9c6c77c9edb}} 
H\+B\+U\+\_\+\+S\+T\+A\+T\+IC&Static buffer which the application rarely modifies once created. Modifying the contents of this buffer will involve a performance hit. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{HBU\_DYNAMIC@{HBU\_DYNAMIC}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!HBU\_DYNAMIC@{HBU\_DYNAMIC}}}\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630abec61c14b13652a06566a79afd6f7518}\label{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630abec61c14b13652a06566a79afd6f7518}} 
H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+IC&Indicates the application would like to modify this buffer with the C\+PU fairly often. Buffers created with this flag will typically end up in A\+GP memory rather than video memory.

This is the least optimal buffer setting. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{HBU\_WRITE\_ONLY@{HBU\_WRITE\_ONLY}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!HBU\_WRITE\_ONLY@{HBU\_WRITE\_ONLY}}}\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a2fe20ff00e9acb928a2d9680f0c505e2}\label{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a2fe20ff00e9acb928a2d9680f0c505e2}} 
H\+B\+U\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY&Indicates the application will never read the contents of the buffer back, it will only ever write data. Locking a buffer with this flag will A\+L\+W\+A\+YS return a pointer to new, blank memory rather than the memory associated with the contents of the buffer; this avoids D\+MA stalls because you can write to a new memory area while the previous one is being used.

However, you may read from it’s shadow buffer if you set one up \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{HBU\_DISCARDABLE@{HBU\_DISCARDABLE}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!HBU\_DISCARDABLE@{HBU\_DISCARDABLE}}}\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a246699879ba7647973a2d8ed86acf76f}\label{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a246699879ba7647973a2d8ed86acf76f}} 
H\+B\+U\+\_\+\+D\+I\+S\+C\+A\+R\+D\+A\+B\+LE&Indicates that the application will be refilling the contents of the buffer regularly (not just updating, but generating the contents from scratch), and therefore does not mind if the contents of the buffer are lost somehow and need to be recreated. This allows and additional level of optimisation on the buffer. This option only really makes sense when combined with H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+I\+C\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{HBU\_STATIC\_WRITE\_ONLY@{HBU\_STATIC\_WRITE\_ONLY}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!HBU\_STATIC\_WRITE\_ONLY@{HBU\_STATIC\_WRITE\_ONLY}}}\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a5ffbb339becd31435c5f616be4c28996}\label{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a5ffbb339becd31435c5f616be4c28996}} 
H\+B\+U\+\_\+\+S\+T\+A\+T\+I\+C\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY&Combination of H\+B\+U\+\_\+\+S\+T\+A\+T\+IC and H\+B\+U\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY This is the optimal buffer usage setting. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{HBU\_DYNAMIC\_WRITE\_ONLY@{HBU\_DYNAMIC\_WRITE\_ONLY}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!HBU\_DYNAMIC\_WRITE\_ONLY@{HBU\_DYNAMIC\_WRITE\_ONLY}}}\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630aa0c82d1b27d6cc04e4b5f6d47a22a74c}\label{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630aa0c82d1b27d6cc04e4b5f6d47a22a74c}} 
H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+I\+C\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY&Combination of H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+IC and H\+B\+U\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY. If you use this, strongly consider using H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+I\+C\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+L\+Y\+\_\+\+D\+I\+S\+C\+A\+R\+D\+A\+B\+LE instead if you update the entire contents of the buffer very regularly. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{HBU\_DYNAMIC\_WRITE\_ONLY\_DISCARDABLE@{HBU\_DYNAMIC\_WRITE\_ONLY\_DISCARDABLE}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!HBU\_DYNAMIC\_WRITE\_ONLY\_DISCARDABLE@{HBU\_DYNAMIC\_WRITE\_ONLY\_DISCARDABLE}}}\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a29ff2e0fd2b408359e84291b27282516}\label{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630a29ff2e0fd2b408359e84291b27282516}} 
H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+I\+C\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+L\+Y\+\_\+\+D\+I\+S\+C\+A\+R\+D\+A\+B\+LE&Combination of H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+IC, H\+B\+U\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY and H\+B\+U\+\_\+\+D\+I\+S\+C\+A\+R\+D\+A\+B\+LE This means that you expect to replace the entire contents of the buffer on an extremely regular basis, most likely every frame. By selecting this option, you free the system up from having to be concerned about losing the existing contents of the buffer at any time, because if it does lose them, you will be replacing them next frame anyway. On some platforms this can make a significant performance difference, so you should try to use this whenever you have a buffer you need to update regularly. Note that if you create a buffer this way, you should use the H\+B\+L\+\_\+\+D\+I\+S\+C\+A\+RD flag when locking the contents of it for writing. \\
\hline

\end{DoxyEnumFields}
\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0f}\label{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0f}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!LockOptions@{LockOptions}}
\index{LockOptions@{LockOptions}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{LockOptions}{LockOptions}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0f}{Ogre\+::\+Hardware\+Buffer\+::\+Lock\+Options}}\hspace{0.3cm}{\ttfamily [inherited]}}



Locking options. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{HBL\_NORMAL@{HBL\_NORMAL}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!HBL\_NORMAL@{HBL\_NORMAL}}}\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0fae11601d29cd56aad7ea7a1b23a688b0e}\label{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0fae11601d29cd56aad7ea7a1b23a688b0e}} 
H\+B\+L\+\_\+\+N\+O\+R\+M\+AL&Normal mode, ie allows read/write and contents are preserved. This kind of lock allows reading and writing from the buffer -\/ it’s also the least optimal because basically you’re telling the card you could be doing anything at all. If you’re not using a shadow buffer, it requires the buffer to be transferred from the card and back again. If you’re using a shadow buffer the effect is minimal. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{HBL\_DISCARD@{HBL\_DISCARD}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!HBL\_DISCARD@{HBL\_DISCARD}}}\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0fa176ad39ac15fc0a6028d820a6fe228ae}\label{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0fa176ad39ac15fc0a6028d820a6fe228ae}} 
H\+B\+L\+\_\+\+D\+I\+S\+C\+A\+RD&Discards the {\itshape entire} buffer while locking. This means you are happy for the card to discard the entire current contents of the buffer. Implicitly this means you are not going to read the data -\/ it also means that the card can avoid any stalls if the buffer is currently being rendered from, because it will actually give you an entirely different one. Use this wherever possible when you are locking a buffer which was not created with a shadow buffer. If you are using a shadow buffer it matters less, although with a shadow buffer it’s preferable to lock the entire buffer at once, because that allows the shadow buffer to use H\+B\+L\+\_\+\+D\+I\+S\+C\+A\+RD when it uploads the updated contents to the real buffer. Only allowed on buffers created with the H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+IC flag. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{HBL\_READ\_ONLY@{HBL\_READ\_ONLY}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!HBL\_READ\_ONLY@{HBL\_READ\_ONLY}}}\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0faa364c1511514cd4d7ee1e7092eb41288}\label{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0faa364c1511514cd4d7ee1e7092eb41288}} 
H\+B\+L\+\_\+\+R\+E\+A\+D\+\_\+\+O\+N\+LY&Lock the buffer for reading only. Not allowed in buffers which are created with H\+B\+U\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY. Mandatory on static buffers, i.\+e. those created without the H\+B\+U\+\_\+\+D\+Y\+N\+A\+M\+IC flag. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{HBL\_NO\_OVERWRITE@{HBL\_NO\_OVERWRITE}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!HBL\_NO\_OVERWRITE@{HBL\_NO\_OVERWRITE}}}\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0fa32a2f7b1c3430cc9c3f0f665934d0c4a}\label{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0fa32a2f7b1c3430cc9c3f0f665934d0c4a}} 
H\+B\+L\+\_\+\+N\+O\+\_\+\+O\+V\+E\+R\+W\+R\+I\+TE&As H\+B\+L\+\_\+\+D\+I\+S\+C\+A\+RD, except the application guarantees not to overwrite any region of the buffer which has already been used in this frame, can allow some optimisation on some A\+P\+Is. This is only useful on buffers with no shadow buffer. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{HBL\_WRITE\_ONLY@{HBL\_WRITE\_ONLY}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!HBL\_WRITE\_ONLY@{HBL\_WRITE\_ONLY}}}\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0faf4acad29e302c7c02ce72c3fce8990df}\label{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0faf4acad29e302c7c02ce72c3fce8990df}} 
H\+B\+L\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY&Lock the buffer for writing only. \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_ab1caebda1f7442706df97531c2d90aaf}\label{class_ogre_1_1_hardware_buffer_ab1caebda1f7442706df97531c2d90aaf}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!lock@{lock}}
\index{lock@{lock}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{lock()}{lock()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily virtual void$\ast$ Ogre\+::\+Hardware\+Buffer\+::lock (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{offset,  }\item[{size\+\_\+t}]{length,  }\item[{\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0f}{Lock\+Options}}}]{options }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [inherited]}}



Lock the buffer for (potentially) reading / writing. 


\begin{DoxyParams}{Parameters}
{\em offset} & The byte offset from the start of the buffer to lock \\
\hline
{\em length} & The size of the area to lock, in bytes \\
\hline
{\em options} & Locking options \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the locked memory 
\end{DoxyReturn}


Reimplemented in \mbox{\hyperlink{class_ogre_1_1_default_hardware_counter_buffer_a4aad9191f9c613bc00b40adcdff52917}{Ogre\+::\+Default\+Hardware\+Counter\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_default_hardware_uniform_buffer_abeeaf1f8e758e683b5b05f54757625a5}{Ogre\+::\+Default\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_hardware_pixel_buffer_a8aaa214f42a683f7203ed42f8c0caf17}{Ogre\+::\+Hardware\+Pixel\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_default_hardware_index_buffer_a377ec1f48ea9a94ae6c84010dd697618}{Ogre\+::\+Default\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_default_hardware_vertex_buffer_a14eb8ea50b3eb46146dcfad7a08ebe73}{Ogre\+::\+Default\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_uniform_buffer_aca464eba11ede23aec2e44b5fafeb197}{Ogre\+::\+D3\+D11\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_vertex_buffer_a67de047be86f5038e32736d94bca91ff}{Ogre\+::\+D3\+D11\+Hardware\+Vertex\+Buffer}}, and \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_index_buffer_a514103d61286de54b12d0e7970481db2}{Ogre\+::\+D3\+D11\+Hardware\+Index\+Buffer}}.



References Ogre\+::\+Exception\+::\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+I\+D\+P\+A\+R\+A\+MS, and O\+G\+R\+E\+\_\+\+E\+X\+C\+E\+PT.



Referenced by Ogre\+::\+Hardware\+Buffer\+::copy\+Data(), and Ogre\+::\+Hardware\+Buffer\+Lock\+Guard\+::lock().

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a93b204642190e611bc226ea08d29160e}\label{class_ogre_1_1_hardware_buffer_a93b204642190e611bc226ea08d29160e}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!lock@{lock}}
\index{lock@{lock}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{lock()}{lock()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void$\ast$ Ogre\+::\+Hardware\+Buffer\+::lock (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_hardware_buffer_aac34930556f611928ec9157c04bd1b0f}{Lock\+Options}}}]{options }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [inherited]}}



This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a64ddd429ff2c8ac4f0cca5decb5c6757}\label{class_ogre_1_1_hardware_buffer_a64ddd429ff2c8ac4f0cca5decb5c6757}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!unlock@{unlock}}
\index{unlock@{unlock}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{unlock()}{unlock()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Hardware\+Buffer\+::unlock (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [inherited]}}



Releases the lock on this buffer. 

\begin{DoxyRemark}{Remarks}
Locking and unlocking a buffer can, in some rare circumstances such as switching video modes whilst the buffer is locked, corrupt the contents of a buffer. This is pretty rare, but if it occurs, this method will throw an exception, meaning you must re-\/upload the data. 
\end{DoxyRemark}
\begin{DoxyParagraph}{}
Note that using the \textquotesingle{}read\textquotesingle{} and \textquotesingle{}write\textquotesingle{} forms of updating the buffer does not suffer from this problem, so if you want to be 100\% sure your data will not be lost, use the \textquotesingle{}read\textquotesingle{} and \textquotesingle{}write\textquotesingle{} forms instead. 
\end{DoxyParagraph}


Reimplemented in \mbox{\hyperlink{class_ogre_1_1_default_hardware_counter_buffer_aa0106887fa02d52596d77b601ebc0859}{Ogre\+::\+Default\+Hardware\+Counter\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_default_hardware_uniform_buffer_a85bb33aad86990cdf6ebcf7fd14ef83e}{Ogre\+::\+Default\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_default_hardware_index_buffer_a99e0bdf70d975699bffaf987a4616b3e}{Ogre\+::\+Default\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_default_hardware_vertex_buffer_af532954d6a6a748a654446feb428fbd0}{Ogre\+::\+Default\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_uniform_buffer_ac60b28af28adcdbe502bcca233e37993}{Ogre\+::\+D3\+D11\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_vertex_buffer_aed62ee8ce3658cbd3a410592b149e7a5}{Ogre\+::\+D3\+D11\+Hardware\+Vertex\+Buffer}}, and \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_index_buffer_a77856e935639af73302824505af41dc5}{Ogre\+::\+D3\+D11\+Hardware\+Index\+Buffer}}.



Referenced by Ogre\+::\+Hardware\+Buffer\+::copy\+Data(), and Ogre\+::\+Hardware\+Buffer\+Lock\+Guard\+::unlock().

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a552f466b57ba77f29e083266d4688765}\label{class_ogre_1_1_hardware_buffer_a552f466b57ba77f29e083266d4688765}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!readData@{readData}}
\index{readData@{readData}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{readData()}{readData()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Hardware\+Buffer\+::read\+Data (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{offset,  }\item[{size\+\_\+t}]{length,  }\item[{void $\ast$}]{p\+Dest }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}, {\ttfamily [inherited]}}



Reads data from the buffer and places it in the memory pointed to by p\+Dest. 


\begin{DoxyParams}{Parameters}
{\em offset} & The byte offset from the start of the buffer to read \\
\hline
{\em length} & The size of the area to read, in bytes \\
\hline
{\em p\+Dest} & The area of memory in which to place the data, must be large enough to accommodate the data! \\
\hline
\end{DoxyParams}


Implemented in \mbox{\hyperlink{class_ogre_1_1_default_hardware_counter_buffer_ace0a8558644446eb744a1b5d6d4dbea9}{Ogre\+::\+Default\+Hardware\+Counter\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_default_hardware_uniform_buffer_a0956a178e764a1dcbd21ddb49e9b39af}{Ogre\+::\+Default\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_hardware_pixel_buffer_abbd6dece7babe2473adc396bb458f53c}{Ogre\+::\+Hardware\+Pixel\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_default_hardware_index_buffer_a6889643eecbb00da9ae4c13042c28a42}{Ogre\+::\+Default\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_buffer_a453360bd8cd047709eb102741d0349b2}{Ogre\+::\+D3\+D11\+Hardware\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_e_s2_hardware_index_buffer_a950d8dcbd84a8780ff5aeee8e7efff7d}{Ogre\+::\+G\+L\+E\+S2\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_e_s2_hardware_vertex_buffer_a9629ee7a993678b4ad19ae416a061eab}{Ogre\+::\+G\+L\+E\+S2\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_default_hardware_vertex_buffer_ae1f894a36722be684e970bfde207400b}{Ogre\+::\+Default\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_hardware_vertex_buffer_ade3a39d1431909705c6cb1d5d2dbfd20}{Ogre\+::\+G\+L\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_shader_storage_buffer_aa0fdd4e49f9eaf0d5a02d22564f21235}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Shader\+Storage\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_hardware_index_buffer_a1f3a35211940e631c0032b8f68e773d9}{Ogre\+::\+G\+L\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_uniform_buffer_ae0e5a1ed5fbf7468f47c875780636a52}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_e_s2_hardware_uniform_buffer_a6d4cf9d48820e55b362e6b12b0f93cd4}{Ogre\+::\+G\+L\+E\+S2\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_counter_buffer_a2f64e0d5896437b4c364df27da9a9046}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Counter\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_index_buffer_ae5686bb6688960683cf08d16bbfdb338}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_vertex_buffer_a7915ceea4f2004df32257ec61a7542d0}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_uniform_buffer_a623c45b83fec2e24f02dd860d455ef04}{Ogre\+::\+D3\+D11\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_vertex_buffer_ab8fb24d8e796d4c3534acf0187f47f6c}{Ogre\+::\+D3\+D11\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_index_buffer_a424ad96bbaffe28063b9c37378da52ab}{Ogre\+::\+D3\+D11\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d9_hardware_index_buffer_ae611e8a8c5fb6534fb930464f4843755}{Ogre\+::\+D3\+D9\+Hardware\+Index\+Buffer}}, and \mbox{\hyperlink{class_ogre_1_1_d3_d9_hardware_vertex_buffer_a6ccf48513ae941ade35f7ed1f517e54a}{Ogre\+::\+D3\+D9\+Hardware\+Vertex\+Buffer}}.

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a8c313688a0df3c28a36738c31fcbc3ee}\label{class_ogre_1_1_hardware_buffer_a8c313688a0df3c28a36738c31fcbc3ee}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!writeData@{writeData}}
\index{writeData@{writeData}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{writeData()}{writeData()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Hardware\+Buffer\+::write\+Data (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{offset,  }\item[{size\+\_\+t}]{length,  }\item[{const void $\ast$}]{p\+Source,  }\item[{bool}]{discard\+Whole\+Buffer = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}, {\ttfamily [inherited]}}



Writes data to the buffer from an area of system memory; note that you must ensure that your buffer is big enough. 


\begin{DoxyParams}{Parameters}
{\em offset} & The byte offset from the start of the buffer to start writing \\
\hline
{\em length} & The size of the data to write to, in bytes \\
\hline
{\em p\+Source} & The source of the data to be written \\
\hline
{\em discard\+Whole\+Buffer} & If true, this allows the driver to discard the entire buffer when writing, such that D\+MA stalls can be avoided; use if you can. \\
\hline
\end{DoxyParams}


Implemented in \mbox{\hyperlink{class_ogre_1_1_default_hardware_counter_buffer_a700f6f79c73fa3e1b8225ebf4177c884}{Ogre\+::\+Default\+Hardware\+Counter\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_default_hardware_uniform_buffer_a34e7770f21684ecb469668cf1b26e8c7}{Ogre\+::\+Default\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_hardware_pixel_buffer_a117ff90e202f525c2a4b7bb9c51eb4df}{Ogre\+::\+Hardware\+Pixel\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_default_hardware_index_buffer_af483fb9a4dad86099af6ab2c9c8f24dd}{Ogre\+::\+Default\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_buffer_a68bc8ad6abbe97fc9ea5d30fcd8aa644}{Ogre\+::\+D3\+D11\+Hardware\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_default_hardware_vertex_buffer_aa7adeb5ed6e988ee23db8e9bd030b03a}{Ogre\+::\+Default\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_e_s2_hardware_index_buffer_a7db93b9bb026901a7ddbacc12728caa4}{Ogre\+::\+G\+L\+E\+S2\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_e_s2_hardware_vertex_buffer_aa3aa4ea5acf2955dea84040d8064fa03}{Ogre\+::\+G\+L\+E\+S2\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_shader_storage_buffer_a779fb23ea70d5fc1c9e098ffa98cdf5d}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Shader\+Storage\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_hardware_vertex_buffer_a195f56f237df95916b9768df147683a6}{Ogre\+::\+G\+L\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_uniform_buffer_a0398390fa7c7a09aa74a35e396b4d2ef}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_e_s2_hardware_uniform_buffer_a9e8635ada6f9fc08be9c574080961562}{Ogre\+::\+G\+L\+E\+S2\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_hardware_index_buffer_a02b0be353ac9b7a745f1a2d3f5d9a674}{Ogre\+::\+G\+L\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_counter_buffer_a798fcfda5a2b26e440046c99bc273911}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Counter\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_index_buffer_a2a81eb9281da28c3ca9a964efe3f7b75}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_vertex_buffer_a4f8b19a922b681e71563854b4736fc69}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_uniform_buffer_a263baf0b339e2470888635fd8b6b5b59}{Ogre\+::\+D3\+D11\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_vertex_buffer_aa43efdd012c3354daf9b2dbcf41003c0}{Ogre\+::\+D3\+D11\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_index_buffer_aef72a2eb1965ca63ea0184660f9578cf}{Ogre\+::\+D3\+D11\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d9_hardware_index_buffer_aaca1828224b9eb8f2cc6be0e89028da9}{Ogre\+::\+D3\+D9\+Hardware\+Index\+Buffer}}, and \mbox{\hyperlink{class_ogre_1_1_d3_d9_hardware_vertex_buffer_a3b6a8851612032ac2e60344243162d40}{Ogre\+::\+D3\+D9\+Hardware\+Vertex\+Buffer}}.

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a721891f0c0bd391dd5848c8a585ba054}\label{class_ogre_1_1_hardware_buffer_a721891f0c0bd391dd5848c8a585ba054}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!copyData@{copyData}}
\index{copyData@{copyData}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{copyData()}{copyData()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Hardware\+Buffer\+::copy\+Data (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_hardware_buffer}{Hardware\+Buffer}} \&}]{src\+Buffer,  }\item[{size\+\_\+t}]{src\+Offset,  }\item[{size\+\_\+t}]{dst\+Offset,  }\item[{size\+\_\+t}]{length,  }\item[{bool}]{discard\+Whole\+Buffer = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [inherited]}}



Copy data from another buffer into this one. 

\begin{DoxyRemark}{Remarks}
Note that the source buffer must not be created with the usage H\+B\+U\+\_\+\+W\+R\+I\+T\+E\+\_\+\+O\+N\+LY otherwise this will fail. 
\end{DoxyRemark}

\begin{DoxyParams}{Parameters}
{\em src\+Buffer} & The buffer from which to read the copied data \\
\hline
{\em src\+Offset} & Offset in the source buffer at which to start reading \\
\hline
{\em dst\+Offset} & Offset in the destination buffer to start writing \\
\hline
{\em length} & Length of the data to copy, in bytes. \\
\hline
{\em discard\+Whole\+Buffer} & If true, will discard the entire contents of this buffer before copying \\
\hline
\end{DoxyParams}


Reimplemented in \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_buffer_a09a5a1ce569c36ad6b180b9cb3ebb67d}{Ogre\+::\+D3\+D11\+Hardware\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_e_s2_hardware_index_buffer_a3bd36b4afae92a7290ef2e10914fb036}{Ogre\+::\+G\+L\+E\+S2\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_e_s2_hardware_vertex_buffer_afefa05dcff66fa31f42fdaa3cfea3306}{Ogre\+::\+G\+L\+E\+S2\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_shader_storage_buffer_af07ad7987c6163b9c35806258731174e}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Shader\+Storage\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_uniform_buffer_ae6ffa229d8a5cc47b89daeca337569ff}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_e_s2_hardware_uniform_buffer_abe6f9462acaf1030f71688b891e6e3b4}{Ogre\+::\+G\+L\+E\+S2\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_counter_buffer_a28234be9fd3744901c51edef35db8d70}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Counter\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_vertex_buffer_ad4c0b74df9eb2b9558f79e52b568cdc8}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_index_buffer_ad79b3e5a58bb93202ac0e6975b745f0c}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_uniform_buffer_aaea2187a82b97ccab8188cfd1377a763}{Ogre\+::\+D3\+D11\+Hardware\+Uniform\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_vertex_buffer_aeeb8e6df6043a3d77ae487f7a1f6ed86}{Ogre\+::\+D3\+D11\+Hardware\+Vertex\+Buffer}}, and \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_index_buffer_aa7657864dada56b4849b556ffb5da86e}{Ogre\+::\+D3\+D11\+Hardware\+Index\+Buffer}}.



References Ogre\+::\+Hardware\+Buffer\+::lock(), and Ogre\+::\+Hardware\+Buffer\+::unlock().

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a0bf3147b1f99a81dd84fb7b978c4686d}\label{class_ogre_1_1_hardware_buffer_a0bf3147b1f99a81dd84fb7b978c4686d}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!copyData@{copyData}}
\index{copyData@{copyData}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{copyData()}{copyData()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Hardware\+Buffer\+::copy\+Data (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_hardware_buffer}{Hardware\+Buffer}} \&}]{src\+Buffer }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [inherited]}}



Copy all data from another buffer into this one. 

\begin{DoxyRemark}{Remarks}
Normally these buffers should be of identical size, but if they\textquotesingle{}re not, the routine will use the smallest of the two sizes. 
\end{DoxyRemark}


References Ogre\+::\+Hardware\+Buffer\+::get\+Size\+In\+Bytes().

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a344c52f2214eaff097d5fbc390e7684b}\label{class_ogre_1_1_hardware_buffer_a344c52f2214eaff097d5fbc390e7684b}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!\_updateFromShadow@{\_updateFromShadow}}
\index{\_updateFromShadow@{\_updateFromShadow}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{\_updateFromShadow()}{\_updateFromShadow()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Hardware\+Buffer\+::\+\_\+update\+From\+Shadow (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [inherited]}}



Updates the real buffer from the shadow buffer, if required. 



Reimplemented in \mbox{\hyperlink{class_ogre_1_1_d3_d11_hardware_buffer_ad40dc0a7f9b7de45253809aa204b1b71}{Ogre\+::\+D3\+D11\+Hardware\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_e_s2_hardware_index_buffer_ad3219addcfdce2d004259d77030197fb}{Ogre\+::\+G\+L\+E\+S2\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_e_s2_hardware_vertex_buffer_a0c195f00d7faf0c4f2a69a9f266dd1e7}{Ogre\+::\+G\+L\+E\+S2\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_vertex_buffer_a917af878074a23bf62feec742ec31b4a}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Vertex\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l3_plus_hardware_index_buffer_a50d34e04964ae41fd391a5c78c32382a}{Ogre\+::\+G\+L3\+Plus\+Hardware\+Index\+Buffer}}, \mbox{\hyperlink{class_ogre_1_1_g_l_hardware_vertex_buffer_a770bdaf9b841a146c1f9254129d26a03}{Ogre\+::\+G\+L\+Hardware\+Vertex\+Buffer}}, and \mbox{\hyperlink{class_ogre_1_1_g_l_hardware_index_buffer_a2e41fb0146913c740432a990b75216a5}{Ogre\+::\+G\+L\+Hardware\+Index\+Buffer}}.

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a9194c7e8b536f4825b15b9e6a6912ce8}\label{class_ogre_1_1_hardware_buffer_a9194c7e8b536f4825b15b9e6a6912ce8}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!getSizeInBytes@{getSizeInBytes}}
\index{getSizeInBytes@{getSizeInBytes}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{getSizeInBytes()}{getSizeInBytes()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Hardware\+Buffer\+::get\+Size\+In\+Bytes (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [inherited]}}



Returns the size of this buffer in bytes. 



Referenced by Ogre\+::\+Hardware\+Buffer\+::copy\+Data().

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a9c5ee6468dcb269e422e213b82726e4f}\label{class_ogre_1_1_hardware_buffer_a9c5ee6468dcb269e422e213b82726e4f}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!getUsage@{getUsage}}
\index{getUsage@{getUsage}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{getUsage()}{getUsage()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_hardware_buffer_ae51f5970d879af736e4cf53e1ec46630}{Usage}} Ogre\+::\+Hardware\+Buffer\+::get\+Usage (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [inherited]}}



Returns the Usage flags with which this buffer was created. 

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a0e1881a6106c59d5aae27589ca1bca5d}\label{class_ogre_1_1_hardware_buffer_a0e1881a6106c59d5aae27589ca1bca5d}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!isSystemMemory@{isSystemMemory}}
\index{isSystemMemory@{isSystemMemory}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{isSystemMemory()}{isSystemMemory()}}
{\footnotesize\ttfamily bool Ogre\+::\+Hardware\+Buffer\+::is\+System\+Memory (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [inherited]}}



Returns whether this buffer is held in system memory. 

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a40a623d95552d9b1858e5c300a3ad68c}\label{class_ogre_1_1_hardware_buffer_a40a623d95552d9b1858e5c300a3ad68c}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!hasShadowBuffer@{hasShadowBuffer}}
\index{hasShadowBuffer@{hasShadowBuffer}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{hasShadowBuffer()}{hasShadowBuffer()}}
{\footnotesize\ttfamily bool Ogre\+::\+Hardware\+Buffer\+::has\+Shadow\+Buffer (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [inherited]}}



Returns whether this buffer has a system memory shadow for quicker reading. 

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a7c874c6b30c39aa38ae0d6abe2ba42bc}\label{class_ogre_1_1_hardware_buffer_a7c874c6b30c39aa38ae0d6abe2ba42bc}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!isLocked@{isLocked}}
\index{isLocked@{isLocked}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{isLocked()}{isLocked()}}
{\footnotesize\ttfamily bool Ogre\+::\+Hardware\+Buffer\+::is\+Locked (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [inherited]}}



Returns whether or not this buffer is currently locked. 

\mbox{\Hypertarget{class_ogre_1_1_hardware_buffer_a688e1be4a913099ce5e06172771e2d45}\label{class_ogre_1_1_hardware_buffer_a688e1be4a913099ce5e06172771e2d45}} 
\index{Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}!suppressHardwareUpdate@{suppressHardwareUpdate}}
\index{suppressHardwareUpdate@{suppressHardwareUpdate}!Ogre::HardwareCounterBuffer@{Ogre::HardwareCounterBuffer}}
\doxysubsubsection{\texorpdfstring{suppressHardwareUpdate()}{suppressHardwareUpdate()}}
{\footnotesize\ttfamily void Ogre\+::\+Hardware\+Buffer\+::suppress\+Hardware\+Update (\begin{DoxyParamCaption}\item[{bool}]{suppress }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [inherited]}}



\mbox{\hyperlink{class_ogre_1_1_pass}{Pass}} true to suppress hardware upload of shadow buffer changes. 



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