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


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}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \hyperlink{class_ogre_1_1_frame_listener_a49e2b4fc5a0d0547f908f1dd9f1ac16d}{$\sim$\+Frame\+Listener} ()
\item 
virtual bool \hyperlink{class_ogre_1_1_frame_listener_af1d0140678c18a013ac45aa544c00bfd}{frame\+Ended} (const \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 \hyperlink{class_ogre_1_1_frame_listener_a2785cb38589ab9df123fa401cbda31c3}{frame\+Rendering\+Queued} (const \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 \hyperlink{class_ogre_1_1_frame_listener_a88238b65f9ce32f0de8c5eeeb7b6c6ad}{frame\+Started} (const \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}


\subsection{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 \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 \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}


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



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_frame_listener_a88238b65f9ce32f0de8c5eeeb7b6c6ad}\label{class_ogre_1_1_frame_listener_a88238b65f9ce32f0de8c5eeeb7b6c6ad}} 
\index{Ogre\+::\+Frame\+Listener@{Ogre\+::\+Frame\+Listener}!frame\+Started@{frame\+Started}}
\index{frame\+Started@{frame\+Started}!Ogre\+::\+Frame\+Listener@{Ogre\+::\+Frame\+Listener}}
\subsubsection{\texorpdfstring{frame\+Started()}{frameStarted()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Frame\+Listener\+::frame\+Started (\begin{DoxyParamCaption}\item[{const \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 \hyperlink{class_ogre_1_1_volume_1_1_chunk_acae8c3c6bac0462d6659dec3c7e5e364}{Ogre\+::\+Volume\+::\+Chunk}, \hyperlink{class_ogre_bites_1_1_application_context_a8d1fe7c9dc681cc4580075fed36d7366}{Ogre\+Bites\+::\+Application\+Context}, and \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\+::\+Frame\+Listener@{Ogre\+::\+Frame\+Listener}!frame\+Rendering\+Queued@{frame\+Rendering\+Queued}}
\index{frame\+Rendering\+Queued@{frame\+Rendering\+Queued}!Ogre\+::\+Frame\+Listener@{Ogre\+::\+Frame\+Listener}}
\subsubsection{\texorpdfstring{frame\+Rendering\+Queued()}{frameRenderingQueued()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Frame\+Listener\+::frame\+Rendering\+Queued (\begin{DoxyParamCaption}\item[{const \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 \hyperlink{class_ogre_bites_1_1_application_context_a9a42a8dab9d90d1f08622c574e63c395}{Ogre\+Bites\+::\+Application\+Context}.

\mbox{\Hypertarget{class_ogre_1_1_frame_listener_af1d0140678c18a013ac45aa544c00bfd}\label{class_ogre_1_1_frame_listener_af1d0140678c18a013ac45aa544c00bfd}} 
\index{Ogre\+::\+Frame\+Listener@{Ogre\+::\+Frame\+Listener}!frame\+Ended@{frame\+Ended}}
\index{frame\+Ended@{frame\+Ended}!Ogre\+::\+Frame\+Listener@{Ogre\+::\+Frame\+Listener}}
\subsubsection{\texorpdfstring{frame\+Ended()}{frameEnded()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Frame\+Listener\+::frame\+Ended (\begin{DoxyParamCaption}\item[{const \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 \hyperlink{class_ogre_bites_1_1_application_context_a57664977e4ac4f78b0855bb1668e4d01}{Ogre\+Bites\+::\+Application\+Context}, and \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 
\hyperlink{_ogre_frame_listener_8h}{Ogre\+Frame\+Listener.\+h}\end{DoxyCompactItemize}
