![]() |
Gorgon Game Engine
|
Root namespace for Gorgon Game Engine. More...
Namespaces | |
Animation | |
This namespace contains animation related functionality. | |
Audio | |
Contains audio subsystem. For audio primitives look into multimedia namespace. | |
CGI | |
Containers | |
This namespace contains containers that are missing from STL or specifically crafted for game or GUI development. | |
Encoding | |
Filesystem | |
Contains filesystem functions. | |
Geometry | |
This namespace contains geometric element classes. | |
GL | |
This namespace contains underlying graphics library functions. | |
Graphics | |
Contains generic 2D graphics related data structures and functions. | |
Input | |
This namespace contains general input related functionality. | |
internal | |
IO | |
OS | |
This namespace contains operating system related functionality. | |
Resource | |
This namespace contains all Gorgon resources. | |
Scripting | |
This namespace contains Gorgon Script parser and reflection facilities. | |
String | |
Contains string related functions and classes. This namespace is not yet utf8 aware. | |
Threading | |
Contains multi-threading functions and objects. | |
Time | |
This module contains time related information. | |
TMP | |
UI | |
This namespace contains User interface related functionality. | |
Utils | |
Widgets | |
WindowManager | |
This namespace contains window manager specific functionality. | |
Classes | |
class | Any |
This class can hold any other information providing type erasure. More... | |
class | AssumeOwnershipTag |
Where acceptable, denotes that the object will assume the ownership. More... | |
class | BinaryProperty |
Supports all operators that the numeric property supports. More... | |
class | BooleanProperty |
Supports logic operators. More... | |
class | Empty |
A class that has no members and can be used as placeholder. More... | |
class | Event |
This class provides event mechanism. More... | |
class | ExchangeData |
Base object for data to be exchanged. More... | |
class | FileData |
Stores list of files for data exchange. More... | |
struct | GetElm |
struct | GetElm< 0, T1_, T_... > |
struct | GetElm< N, T1_, T_... > |
class | Layer |
This class is the base class for all layer types. More... | |
class | MouseHandler |
class | MutableObjectProperty |
Object property allows the consumers of the property to be able to access objects member functions and variables. More... | |
class | NumericProperty |
Supports arithmetic operators including +, * ..., +=, ... More... | |
class | ObjectProperty |
Object property allows the consumers of the property to be able to access object's member functions and data members in a const manner. More... | |
class | Property |
This is generic property that can be set and retrieved good for enums mostly, its ok to use with POD structs for direct assignment but better not to use it with complex data types. More... | |
class | Range |
This class represents a range of values. More... | |
class | ReferenceProperty |
Reference property allows clients to access a reference object within the class. More... | |
class | Runner |
Defines the abstract class of Runner. More... | |
class | Scene |
This class represents a scene in the game like menu screen in game, post game, pause or different game modes. More... | |
class | SceneManager |
This class is a Window that manages scenes, allowing swapping, handling input and game loop. More... | |
class | SGuid |
This class represents a short globally unique identifier. More... | |
class | StructDefiner |
class | TextData |
Stores text data for data exchange. More... | |
class | TextualProperty |
Supports everything that string class supports including +, +=, length() More... | |
class | Updatable |
Marks an object that can be updated. More... | |
class | Window |
This class represents a window. More... | |
Typedefs | |
typedef unsigned char | Byte |
Represents smallest cell in memory. More... | |
typedef uint32_t | Char |
typedef intptr_t | EventToken |
Generic type to store event tokens. More... | |
typedef float | Float |
Represents floating point data type. More... | |
using | SceneID = int |
Can be used to identify scenes. More... | |
Enumerations | |
enum | ItemPosition { Nowhere, Alone, First, Middle, Last } |
Defines where an item is located in a list. More... | |
enum | Parity { None, Odd, Even } |
Marks the parity as Odd or Even. More... | |
enum | YesNoAuto { No, Yes, Auto } |
This enumeration helps with systems that has boolen parameters that can be detected automatically, but can also be overriden. More... | |
enum | YesNoUnset { No, Yes, Unset } |
This enumeration helps with systems that has boolen parameters that can be unset/empty. More... | |
Functions | |
template<class T_ > | |
std::vector< T_ >::const_iterator | begin (enum_type_id< T_ >) |
template<class T_ > | |
bool | Between (Range< T_ > range, T_ v) |
Returns if the given number is within the given range including min but excluding max. More... | |
template<class T_ > | |
bool | Between (T_ v, T_ min, T_ max) |
Returns if the given number is within the given range including min but excluding max. More... | |
template<class T_ > | |
bool | BetweenInclusive (T_ v, T_ min, T_ max) |
Returns if the given number is within the given range including min and max. More... | |
uint32_t | CeilToPowerOf2 (uint32_t v) |
Calculate the smalllest power of two larger than this value. More... | |
template<class T_ > | |
T_ | Clamp (T_ v, T_ min, T_ max) |
Performs clamping on the given value and returns the result. More... | |
template<class T_ > | |
std::vector< T_ >::const_iterator | end (enum_type_id< T_ >) |
template<class T_ > | |
std::enable_if< decltype(gorgon__enum_tr_loc(T_()))::isupgradedenum, enum_type_id< T_ > >::type | Enumerate () |
Allows enumeration of upgraded enums using range based for. More... | |
template<class T_ > | |
void | FitInto (T_ &v, T_ min, T_ max) |
Performs clamping on the given value. More... | |
std::string | GetSystemName () |
Returns the name of the current system. More... | |
void | Initialize (const std::string &systemname) |
Initializes the entire system except for graphics and UI. More... | |
void | NextFrame () |
This function marks the end of current frame and starts the next one. More... | |
int | NumberOfSetBits (uint32_t i) |
Returns the number of bits that are 1 in a number. More... | |
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_> | |
T_ | operator+ (const char *v, TextualProperty< C_, T_, Setter_, Getter_ > &t) |
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_> | |
T_ | operator+ (const T_ &v, TextualProperty< C_, T_, Setter_, Getter_ > &t) |
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_> | |
T_ | operator+ (TextualProperty< C_, T_, Setter_, Getter_ > &t, const char *v) |
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_> | |
T_ | operator+ (TextualProperty< C_, T_, Setter_, Getter_ > &t, const T_ &v) |
template<class C_ , class T_ , T_(C_::*)() const G_, void(C_::*)(const T_ &) S_> | |
std::ostream & | operator<< (std::ostream &out, const NumericProperty< C_, T_, G_, S_ > &p) |
template<class C_ , class T_ , T_(C_::*)() const G_, void(C_::*)(const T_ &) S_> | |
std::ostream & | operator<< (std::ostream &out, const TextualProperty< C_, T_, G_, S_ > &p) |
std::ostream & | operator<< (std::ostream &stream, const SGuid &guid) |
Inserts an SGuid to a stream. More... | |
template<class C_ , class T_ , T_(C_::*)() const G_, void(C_::*)(const T_ &) S_> | |
std::istream & | operator>> (std::istream &in, NumericProperty< C_, T_, G_, S_ > &p) |
std::istream & | operator>> (std::istream &in, SGuid &guid) |
Extracts an SGuid from a stream. Allows an optional % at the beginning. More... | |
template<class C_ , class T_ , T_(C_::*)() const G_, void(C_::*)(const T_ &) S_> | |
std::istream & | operator>> (std::istream &in, TextualProperty< C_, T_, G_, S_ > &p) |
template<typename T_ > | |
T_ | PositiveMod (T_ value, T_ mod) |
void | RegisterOnce (std::function< void()> fn) |
Registers a function to be run at the start of the next frame. More... | |
void | Render () |
This function calls the starts the rendering pipeline. More... | |
void | ResetTransform (const Geometry::Size &size) |
This should be called by the windows to reset transformation stack. More... | |
template<typename T_ > | |
int | Sign (T_ val) |
template<class Source_ , class... Args_> | |
void | swap (Event< Source_, Args_... > &l, Event< Source_, Args_... > &r) |
Swaps two events. More... | |
void | Tick () |
Performs various operations that are vital to system execution. More... | |
void | UpdateFrame () |
This method works similar to next frame, however, no delay is done. More... | |
Variables | |
Event | BeforeFrameEvent |
Geometry::Bounds | Clip |
Current clipping size, for mouse and clipping events. More... | |
bool | exiting |
Graphics::RGBAf | LayerColor |
Geometry::Point | Offset |
Current layer offset from the top left of the window. More... | |
std::vector< std::function< void()> > | once |
std::vector< Geometry::Bounds > | prev_Clip |
std::vector< Geometry::Point > | prev_Offset |
std::vector< Geometry::Transform3D > | prev_Transform |
Geometry::Size | ScreenSize |
Geometry::Transform3D | Transform |
Current layer transformation, only for render and mouse. More... | |
Root namespace for Gorgon Game Engine.
IO Related functionality.
todo y-kerning support
Contains base class for all shaders ShaderBase and facilities for loading/compiling shaders.
Stream operations in this namespace do not check the validity of the stream. it is up to the caller
typedef unsigned char Byte |
Represents smallest cell in memory.
typedef uint32_t Char |
typedef intptr_t EventToken |
Generic type to store event tokens.
typedef float Float |
Represents floating point data type.
GORGON_USE_DOUBLE definition allows switching to double for precision sensitive functions.
using SceneID = int |
Can be used to identify scenes.
|
strong |
|
strong |
|
strong |
|
strong |
std::vector<T_>::const_iterator Gorgon::begin | ( | enum_type_id< T_ > | ) |
bool Gorgon::Between | ( | Range< T_ > | range, |
T_ | v | ||
) |
Returns if the given number is within the given range including min but excluding max.
References Range< T_ >::End, and Range< T_ >::Start.
bool Gorgon::Between | ( | T_ | v, |
T_ | min, | ||
T_ | max | ||
) |
Returns if the given number is within the given range including min but excluding max.
bool Gorgon::BetweenInclusive | ( | T_ | v, |
T_ | min, | ||
T_ | max | ||
) |
Returns if the given number is within the given range including min and max.
uint32_t Gorgon::CeilToPowerOf2 | ( | uint32_t | v | ) |
Calculate the smalllest power of two larger than this value.
T_ Gorgon::Clamp | ( | T_ | v, |
T_ | min, | ||
T_ | max | ||
) |
Performs clamping on the given value and returns the result.
std::vector<T_>::const_iterator Gorgon::end | ( | enum_type_id< T_ > | ) |
std::enable_if<decltype(gorgon__enum_tr_loc(T_()))::isupgradedenum, enum_type_id<T_> >::type Gorgon::Enumerate | ( | ) |
Allows enumeration of upgraded enums using range based for.
void Gorgon::FitInto | ( | T_ & | v, |
T_ | min, | ||
T_ | max | ||
) |
Performs clamping on the given value.
std::string Gorgon::GetSystemName | ( | ) |
Returns the name of the current system.
References Gorgon::internal::systemname.
void Initialize | ( | const std::string & | systemname | ) |
Initializes the entire system except for graphics and UI.
Graphics should be initialized after a window is created and UI should be initialized last.
References Gorgon::Audio::Initialize(), Gorgon::Filesystem::Initialize(), Gorgon::Resource::Initialize(), Gorgon::Scripting::Initialize(), Gorgon::WindowManager::Initialize(), and Gorgon::internal::systemname.
void NextFrame | ( | ) |
This function marks the end of current frame and starts the next one.
This function calls the Tick function at start of the next frame. Additionally, this function calls end of frame tasks such as rendering. Before starting the next frame, a certain delay is performed. This delay aims to set each frame duration to 16ms, this duration sets the frames per second to 62.5. This delay greatly reduces the system load of simple games/applications.
References BeforeFrameEvent, Gorgon::Time::FrameStart(), Gorgon::Time::GetTime(), Gorgon::OS::processmessages(), Render(), and Tick().
int Gorgon::NumberOfSetBits | ( | uint32_t | i | ) |
Returns the number of bits that are 1 in a number.
T_ Gorgon::operator+ | ( | const char * | v, |
TextualProperty< C_, T_, Setter_, Getter_ > & | t | ||
) |
T_ Gorgon::operator+ | ( | const T_ & | v, |
TextualProperty< C_, T_, Setter_, Getter_ > & | t | ||
) |
T_ Gorgon::operator+ | ( | TextualProperty< C_, T_, Setter_, Getter_ > & | t, |
const char * | v | ||
) |
T_ Gorgon::operator+ | ( | TextualProperty< C_, T_, Setter_, Getter_ > & | t, |
const T_ & | v | ||
) |
std::ostream& Gorgon::operator<< | ( | std::ostream & | out, |
const NumericProperty< C_, T_, G_, S_ > & | p | ||
) |
std::ostream& Gorgon::operator<< | ( | std::ostream & | out, |
const TextualProperty< C_, T_, G_, S_ > & | p | ||
) |
std::ostream& Gorgon::operator<< | ( | std::ostream & | stream, |
const SGuid & | guid | ||
) |
Inserts an SGuid to a stream.
std::istream& Gorgon::operator>> | ( | std::istream & | in, |
NumericProperty< C_, T_, G_, S_ > & | p | ||
) |
std::istream& Gorgon::operator>> | ( | std::istream & | in, |
SGuid & | guid | ||
) |
Extracts an SGuid from a stream. Allows an optional % at the beginning.
References SGuid::Bytes, and SGuid::Integer.
std::istream& Gorgon::operator>> | ( | std::istream & | in, |
TextualProperty< C_, T_, G_, S_ > & | p | ||
) |
T_ Gorgon::PositiveMod | ( | T_ | value, |
T_ | mod | ||
) |
void RegisterOnce | ( | std::function< void()> | fn | ) |
Registers a function to be run at the start of the next frame.
References once.
void Render | ( | ) |
This function calls the starts the rendering pipeline.
Rendering should be last operation of a frame.
References Window::Windows.
void Gorgon::ResetTransform | ( | const Geometry::Size & | size | ) |
This should be called by the windows to reset transformation stack.
References basic_Size< T_ >::Height, basic_Transform3D< T_ >::Scale(), Transform, basic_Transform3D< T_ >::Translate(), and basic_Size< T_ >::Width.
int Gorgon::Sign | ( | T_ | val | ) |
Swaps two events.
References Event< Source_, Params_ >::Swap().
void Tick | ( | ) |
Performs various operations that are vital to system execution.
These include OS message handling, animation and sound progressions, time progression and delta time calculation. NextFrame function should be preferred if the frame delay is tolerable.
References Gorgon::Animation::Animate(), Gorgon::Time::internal::deltatime, Gorgon::Time::internal::framestart, Gorgon::Time::GetTime(), once, and Gorgon::OS::processmessages().
void UpdateFrame | ( | ) |
This method works similar to next frame, however, no delay is done.
This function allows an application to update the display and perform OS tasks while still continuing operation.
References BeforeFrameEvent, Gorgon::OS::processmessages(), Render(), and Tick().
Event BeforeFrameEvent |
Geometry::Bounds Clip |
Current clipping size, for mouse and clipping events.
bool exiting |
Graphics::RGBAf LayerColor |
Geometry::Point Offset |
Current layer offset from the top left of the window.
std::vector<std::function<void()> > once |
std::vector<Geometry::Bounds> prev_Clip |
std::vector<Geometry::Point> prev_Offset |
std::vector<Geometry::Transform3D> prev_Transform |
Geometry::Size ScreenSize |
Geometry::Transform3D Transform |
Current layer transformation, only for render and mouse.