\hypertarget{class_ogre_1_1_frame_listener}{}\doxysection{Ogre\+::Frame\+Listener Class Reference}
\label{class_ogre_1_1_frame_listener}\index{Ogre::FrameListener@{Ogre::FrameListener}}


A interface class defining a listener which can be used to receive notifications of frame events.  




{\ttfamily \#include $<$Ogre\+Frame\+Listener.\+h$>$}



Inheritance diagram for Ogre\+::Frame\+Listener\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_frame_listener__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{class_ogre_1_1_frame_listener_a49e2b4fc5a0d0547f908f1dd9f1ac16d}{$\sim$\+Frame\+Listener}} ()
\item 
virtual bool \mbox{\hyperlink{class_ogre_1_1_frame_listener_af1d0140678c18a013ac45aa544c00bfd}{frame\+Ended}} (const \mbox{\hyperlink{struct_ogre_1_1_frame_event}{Frame\+Event}} \&evt)
\begin{DoxyCompactList}\small\item\em Called just after a frame has been rendered. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{class_ogre_1_1_frame_listener_a2785cb38589ab9df123fa401cbda31c3}{frame\+Rendering\+Queued}} (const \mbox{\hyperlink{struct_ogre_1_1_frame_event}{Frame\+Event}} \&evt)
\begin{DoxyCompactList}\small\item\em Called after all render targets have had their rendering commands issued, but before render windows have been asked to flip their buffers over. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{class_ogre_1_1_frame_listener_a88238b65f9ce32f0de8c5eeeb7b6c6ad}{frame\+Started}} (const \mbox{\hyperlink{struct_ogre_1_1_frame_event}{Frame\+Event}} \&evt)
\begin{DoxyCompactList}\small\item\em Called when a frame is about to begin rendering. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A interface class defining a listener which can be used to receive notifications of frame events. 

\begin{DoxyRemark}{Remarks}
A \textquotesingle{}listener\textquotesingle{} is an interface designed to be called back when particular events are called. This class defines the interface relating to frame events. In order to receive notifications of frame events, you should create a subclass of \mbox{\hyperlink{class_ogre_1_1_frame_listener}{Frame\+Listener}} and override the methods for which you would like to customise the resulting processing. You should then call \mbox{\hyperlink{class_ogre_1_1_root_aed3244a81b1c1cec76c675f8e62d7f5e}{Root\+::add\+Frame\+Listener}} passing an instance of this class. There is no limit to the number of frame listeners you can register, allowing you to register multiple listeners for different purposes. Note that a frame event occurs once for all rendering targets, not once per target. 
\end{DoxyRemark}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_frame_listener_a49e2b4fc5a0d0547f908f1dd9f1ac16d}\label{class_ogre_1_1_frame_listener_a49e2b4fc5a0d0547f908f1dd9f1ac16d}} 
\index{Ogre::FrameListener@{Ogre::FrameListener}!````~FrameListener@{$\sim$FrameListener}}
\index{````~FrameListener@{$\sim$FrameListener}!Ogre::FrameListener@{Ogre::FrameListener}}
\doxysubsubsection{\texorpdfstring{$\sim$FrameListener()}{~FrameListener()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Frame\+Listener\+::$\sim$\+Frame\+Listener (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_frame_listener_a88238b65f9ce32f0de8c5eeeb7b6c6ad}\label{class_ogre_1_1_frame_listener_a88238b65f9ce32f0de8c5eeeb7b6c6ad}} 
\index{Ogre::FrameListener@{Ogre::FrameListener}!frameStarted@{frameStarted}}
\index{frameStarted@{frameStarted}!Ogre::FrameListener@{Ogre::FrameListener}}
\doxysubsubsection{\texorpdfstring{frameStarted()}{frameStarted()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Frame\+Listener\+::frame\+Started (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{struct_ogre_1_1_frame_event}{Frame\+Event}} \&}]{evt }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Called when a frame is about to begin rendering. 

\begin{DoxyRemark}{Remarks}
This event happens before any render targets have begun updating. 
\end{DoxyRemark}
\begin{DoxyReturn}{Returns}
True to go ahead, false to abort rendering and drop out of the rendering loop. 
\end{DoxyReturn}


Reimplemented in \mbox{\hyperlink{class_ogre_bites_1_1_application_context_base_a066e6af742131478b6bb6e13635103f4}{Ogre\+Bites\+::\+Application\+Context\+Base}}, \mbox{\hyperlink{class_ogre_1_1_volume_1_1_chunk_acae8c3c6bac0462d6659dec3c7e5e364}{Ogre\+::\+Volume\+::\+Chunk}}, and \mbox{\hyperlink{class_ogre_1_1_frame_time_controller_value_a15caa3fcb86af2036b336a5fa6efd1cd}{Ogre\+::\+Frame\+Time\+Controller\+Value}}.

\mbox{\Hypertarget{class_ogre_1_1_frame_listener_a2785cb38589ab9df123fa401cbda31c3}\label{class_ogre_1_1_frame_listener_a2785cb38589ab9df123fa401cbda31c3}} 
\index{Ogre::FrameListener@{Ogre::FrameListener}!frameRenderingQueued@{frameRenderingQueued}}
\index{frameRenderingQueued@{frameRenderingQueued}!Ogre::FrameListener@{Ogre::FrameListener}}
\doxysubsubsection{\texorpdfstring{frameRenderingQueued()}{frameRenderingQueued()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Frame\+Listener\+::frame\+Rendering\+Queued (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{struct_ogre_1_1_frame_event}{Frame\+Event}} \&}]{evt }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Called after all render targets have had their rendering commands issued, but before render windows have been asked to flip their buffers over. 

\begin{DoxyRemark}{Remarks}
The usefulness of this event comes from the fact that rendering commands are queued for the G\+PU to process. These can take a little while to finish, and so while that is happening the C\+PU can be doing useful things. Once the request to \textquotesingle{}flip buffers\textquotesingle{} happens, the thread requesting it will block until the G\+PU is ready, which can waste C\+PU cycles. Therefore, it is often a good idea to use this callback to perform per-\/frame processing. Of course because the frame\textquotesingle{}s rendering commands have already been issued, any changes you make will only take effect from the next frame, but in most cases that\textquotesingle{}s not noticeable. 
\end{DoxyRemark}
\begin{DoxyReturn}{Returns}
True to continue rendering, false to drop out of the rendering loop. 
\end{DoxyReturn}


Reimplemented in \mbox{\hyperlink{class_ogre_bites_1_1_application_context_base_af8879ee99573721666a02346424bbacb}{Ogre\+Bites\+::\+Application\+Context\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_frame_listener_af1d0140678c18a013ac45aa544c00bfd}\label{class_ogre_1_1_frame_listener_af1d0140678c18a013ac45aa544c00bfd}} 
\index{Ogre::FrameListener@{Ogre::FrameListener}!frameEnded@{frameEnded}}
\index{frameEnded@{frameEnded}!Ogre::FrameListener@{Ogre::FrameListener}}
\doxysubsubsection{\texorpdfstring{frameEnded()}{frameEnded()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Frame\+Listener\+::frame\+Ended (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{struct_ogre_1_1_frame_event}{Frame\+Event}} \&}]{evt }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Called just after a frame has been rendered. 

\begin{DoxyRemark}{Remarks}
This event happens after all render targets have been fully updated and the buffers switched. 
\end{DoxyRemark}
\begin{DoxyReturn}{Returns}
True to continue with the next frame, false to drop out of the rendering loop. 
\end{DoxyReturn}


Reimplemented in \mbox{\hyperlink{class_ogre_bites_1_1_application_context_base_a3368c68bdb811b87df2144aa4e1345bc}{Ogre\+Bites\+::\+Application\+Context\+Base}}, and \mbox{\hyperlink{class_ogre_1_1_frame_time_controller_value_a2ee210328604677cb76ba0e4d97bd84a}{Ogre\+::\+Frame\+Time\+Controller\+Value}}.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{_ogre_frame_listener_8h}{Ogre\+Frame\+Listener.\+h}}\end{DoxyCompactItemize}
