27 #ifndef _CEGuiBaseApplication_h_
28 #define _CEGuiBaseApplication_h_
39 # define PATH_MAX _MAX_PATH
54 class ResourceProvider;
117 bool isInitialised();
140 virtual void run() = 0;
203 #endif // end of guard _CEGuiBaseApplication_h_
Abstract ImageLoader class. An image loader encapsulate the loading of a texture. ...
Definition: cegui/include/CEGUI/ImageCodec.h:45
Definition: cegui/include/CEGUI/GUIContext.h:68
static SamplesFrameworkBase * d_sampleApp
SampleFramework base used in the application.
Definition: CEGuiBaseApplication.h:175
CEGUI::Renderer * d_renderer
Renderer to use. This MUST be set in the subclass constructor.
Definition: CEGuiBaseApplication.h:184
Abstract class that defines the required interface for all resource provider sub-classes.
Definition: cegui/include/CEGUI/ResourceProvider.h:47
Main namespace for Crazy Eddie's GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42
virtual void run()=0
The abstract function for initialising and running the application.
virtual ~CEGuiBaseApplication()
Destructor.
Definition: CEGuiBaseApplication.cpp:80
Base class used as the argument to all subscribers Event object.
Definition: cegui/include/CEGUI/EventArgs.h:49
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: cegui/include/CEGUI/GeometryBuffer.h:42
CEGuiBaseApplication()
Constructor.
Definition: CEGuiBaseApplication.cpp:65
int d_FPSValue
Last changed FPS value.
Definition: CEGuiBaseApplication.h:198
const char * getDataPathPrefix() const
Return the path prefix to use for datafiles. The value returned is obtained via a environment variabl...
Definition: CEGuiBaseApplication.cpp:228
int d_FPSFrames
Number of frames drawn so far.
Definition: CEGuiBaseApplication.h:196
CEGUI::ResourceProvider * d_resourceProvider
ResourceProvider to use. Set in subclass constructor, may be 0.
Definition: CEGuiBaseApplication.h:188
void updateFPS(const float elapsed)
function that updates the FPS rendering as needed.
Definition: CEGuiBaseApplication.cpp:286
virtual void destroyWindow()=0
The abstract function for destroying the renderer and the window.
virtual void initialiseDefaultResourceGroups()
initialise the standard default resource groups used by the samples.
Definition: CEGuiBaseApplication.cpp:210
void cleanup()
Performs any required cleanup of the base application system.
Definition: CEGuiBaseApplication.cpp:171
virtual void initialiseResourceGroupDirectories()
Setup standard sample resource group directory locations. Default uses the CEGUI::DefaultResourceProv...
Definition: CEGuiBaseApplication.cpp:180
void registerSampleOverlayHandler(CEGUI::GUIContext *gui_context)
Registers the overlay handler for rendering the FPS for a specified GUIContext.
Definition: CEGuiBaseApplication.cpp:368
Abstract class defining the basic required interface for Renderer objects.
Definition: cegui/include/CEGUI/Renderer.h:82
CEGUI::ImageCodec * d_imageCodec
ImageCodec to use. Set in subclass constructor, may be 0.
Definition: CEGuiBaseApplication.h:186
This is a base class that is intended to be used for all sample applications. Here we take care of co...
Definition: SamplesFrameworkBase.h:42
void positionFPS()
positions the FPS counter at the correct place.
Definition: CEGuiBaseApplication.cpp:341
Base application abstract base class.
Definition: CEGuiBaseApplication.h:67
static const char DATAPATH_VAR_NAME[]
name of env var that holds the path prefix to the data files.
Definition: CEGuiBaseApplication.h:137
static const int s_defaultWindowHeight
The window height the application should get created with at start.
Definition: CEGuiBaseApplication.h:179
static const int s_defaultWindowWidth
The window width the application should get created with at start.
Definition: CEGuiBaseApplication.h:177
bool execute(SamplesFrameworkBase *sampleApp)
Start the base application.
Definition: CEGuiBaseApplication.cpp:109
virtual void endRendering()=0
Implementation function to perform required post-render operations.
void renderSingleFrame(const float elapsed)
Render a single display frame. This should be called by subclasses to perform rendering.
Definition: CEGuiBaseApplication.cpp:85
CEGUI::GeometryBuffer * d_logoGeometry
GeometryBuffer used for drawing the spinning CEGUI logo.
Definition: CEGuiBaseApplication.h:190
bool resizeHandler(const CEGUI::EventArgs &args)
event handler function called when main view is resized
Definition: CEGuiBaseApplication.cpp:352
bool d_spinLogo
whether to spin the logo
Definition: CEGuiBaseApplication.h:200
bool d_quitting
true when the base app should cleanup and exit.
Definition: CEGuiBaseApplication.h:182
void positionLogo()
function that positions the logo in the correct place.
Definition: CEGuiBaseApplication.cpp:331
float d_FPSElapsed
Fraction of second elapsed (used for counting frames per second).
Definition: CEGuiBaseApplication.h:194
bool sampleOverlayHandler(const CEGUI::EventArgs &args)
event handler function that draws the FPS overlay elements.
Definition: CEGuiBaseApplication.cpp:274
void updateLogo(const float elapsed)
function that updates the logo rotation as needed.
Definition: CEGuiBaseApplication.cpp:319
CEGUI::GeometryBuffer * d_FPSGeometry
GeometryBuffer used for drawing the FPS value.
Definition: CEGuiBaseApplication.h:192
virtual void beginRendering(const float elapsed)=0
Implementation function to perform required pre-render operations.
bool sampleBrowserOverlayHandler(const CEGUI::EventArgs &args)
event handler function that draws the logo and FPS overlay elements.
Definition: CEGuiBaseApplication.cpp:260