Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::Win32AppBase Class Referenceabstract

Base class for Win32 applications. More...

#include <Win32AppBase.hpp>

Inheritance diagram for Diligent::Win32AppBase:
Diligent::AppBase

Public Member Functions

virtual bool OnWindowCreated (HWND hWnd, LONG WindowWidth, LONG WindowHeight)=0
 Called by the framework after the window has been created.
 
virtual LRESULT HandleWin32Message (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 Handles Win32 message.
 
- Public Member Functions inherited from Diligent::AppBase
virtual CommandLineStatus ProcessCommandLine (int argc, const char *const *argv)=0
 Processes the command line arguments.
 
virtual const char * GetAppTitle () const =0
 Returns the application tile.
 
virtual void Update (double CurrTime, double ElapsedTime)
 Updates the application state.
 
virtual void Render ()=0
 Renders the frame.
 
virtual void Present ()=0
 Presents the frame.
 
virtual void WindowResize (int width, int height)=0
 Called when the window resizes.
 
virtual void GetDesiredInitialWindowSize (int &width, int &height)
 Called by the framework to request the desired initial window size.
 
virtual GoldenImageMode GetGoldenImageMode () const
 Returns the golden image mode, see Diligent::AppBase::GoldenImageMode.
 
virtual int GetExitCode () const
 Returns the exit code.
 
virtual bool IsReady () const
 Returns true if the app is initialized and ready to run.
 
virtual HOT_KEY_FLAGS GetHotKeyFlags () const
 Returns the hot key handling flags.
 

Additional Inherited Members

- Public Types inherited from Diligent::AppBase
enum class  GoldenImageMode { None = 0 , Capture , Compare , CompareUpdate }
 Golden image capture mode. More...
 
enum class  CommandLineStatus { OK , Help , Error }
 Command line processing result. More...
 

Detailed Description

Base class for Win32 applications.

Member Function Documentation

◆ HandleWin32Message()

virtual LRESULT Diligent::Win32AppBase::HandleWin32Message ( HWND hWnd,
UINT message,
WPARAM wParam,
LPARAM lParam )
inlinevirtual

Handles Win32 message.

An application may override this method to implement its windows message processing routine.

Parameters
[in]hWnd- Window handle.
[in]message- Window message.
[in]wParam- Window message wparam.
[in]lParam- Window message lparam.

◆ OnWindowCreated()

virtual bool Diligent::Win32AppBase::OnWindowCreated ( HWND hWnd,
LONG WindowWidth,
LONG WindowHeight )
pure virtual

Called by the framework after the window has been created.

Parameters
[in]hWnd- Window handle.
[in]WindowWidth- Window width.
[in]WindowHeight- Window height.
Returns
true if the operation succeeded, and false otherwise.
Remarks
An application may override AppBase::GetDesiredInitialWindowSize method to specify desired initial window size.