Kigs Framework  Doc version 0.8
Open source multi purpose Rapid Application Development framework
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RenderingScreen Class Referenceabstract

#include <RenderingScreen.h>

Inheritance diagram for RenderingScreen:
CoreModifiable GenericRefCountedBaseClass DX11RenderingScreen OpenGLRenderingScreen

Public Member Functions

virtual bool SetActive (TravState *state)
 active the screen More...
 
virtual void Release (TravState *state)=0
 release the screen
 
void GetRotation (kfloat &rot)
 get the rotation of the screen More...
 
void GetSize (kfloat &sizeX, kfloat &sizeY)
 get the size of the screen More...
 
void GetDesignSize (kfloat &dsizeX, kfloat &dsizeY)
 get the design size of the screen : the resolution the graphics shown on screen were designed for More...
 
bool IsInit ()
 check if the screen has been initialized More...
 
virtual void Resize (kfloat sizeX, kfloat sizeY)=0
 resize the screen More...
 
virtual void SetWindowByHandle (void *PtrToHandle)=0
 Set the target window handle of the rendering. If null, the Window name passed through "ParentWindowName" will be used. More...
 
virtual void * GetContextHandle ()=0
 get the target window handle of the rendering.
 
bool GetDataInTouchSupport (const touchPosInfos &posin, touchPosInfos &pout)
 convert touch pos in local "touch support" coordinates More...
 
- Public Member Functions inherited from CoreModifiable
void Init ()
 Modifiable managmenent.
 
void EmptyItemList ()
 remove all items (sons)
 
CMSP GetInstanceByPath (const std::string &path)
 return the instance corresponding to the given path in sons tree
 
std::string GetRuntimeID () const
 ID.
 
CoreModifiableAttributegetAttribute (KigsID labelid) const
 Attribute management.
 
u32 getNbArrayElements (KigsID attributeLabel) const
 return element count for an array type attribute
 
template<typename attribute_type , typename value_type >
attribute_type * AddDynamicAttribute (KigsID ID, const value_type &value)
 Dynamic attribute management.
 
const kigs::unordered_map< KigsID, ModifiableMethodStruct > * GetMethods ()
 Method management.
 
bool aggregateWith (CMSP &item, ItemPosition pos=Last)
 Aggregate management.
 
void flagAsNotificationCenterRegistered ()
 Flags.
 
void InitParametersFromList (const std::vector< CoreModifiableAttribute * > *params)
 Utility. More...
 
virtual void UninitModifiable ()
 called when InitModifiable has failled : reset read/write flag on all init params More...
 
virtual void ProtectedDestroy ()
 Destroy method decrement refcounter and delete instance if no more used. More...
 
virtual void addUser (CoreModifiable *user)
 add the given parent to list
 
virtual void removeUser (CoreModifiable *user)
 remove user (parent)
 
virtual bool addItem (const CMSP &item, ItemPosition pos=Last)
 add item at first or last position
 
virtual bool removeItem (const CMSP &item)
 remove item (son)
 

Protected Member Functions

void InitModifiable () override
 default modifiable init : set all initparams to readonly and set initflag to true More...
 
- Protected Member Functions inherited from CoreModifiable
void UpdateAggregates (const Timer &timer, void *addParam)
 Internals.
 
void Export (std::vector< CoreModifiable * > &savedList, XMLNode *currentNode, bool recursive, ExportSettings *settings)
 Export. More...
 
CoreModifiableAttributeGenericCreateDynamicAttribute (CoreModifiable::ATTRIBUTE_TYPE type, KigsID ID)
 create and add dynamic attribute except arrays
 

Protected Attributes

bool mIsInit
 TRUE if the screen has been initialized.
 
maInt mBitsPerPixel
 size of a pixel in bit
 
maInt mBitsPerZ
 size of the Z value in bit
 
maUInt mSizeX
 size of the screen on x axis
 
maUInt mSizeY
 size of the screen on y axis
 
maUInt mDesignSizeX
 design size of the screen on x axis
 
maUInt mDesignSizeY
 design size of the screen on y axis
 
maBool mIsOffScreen
 ?
 
maString mParentWindowName
 name of the parent windows
 
maBool mVSync
 TRUE if I wait for the VSync.
 
maFloat mBrightness
 brightness : between -16 (black) and 16 (white)
 
maVect3DF mBackDropColor
 back drop color
 
maFloat mRotation
 screen orientation (for handheld devices)
 
maBool mDontClear
 indicate the screen don't need clear (camera should still clear their part of screen)
 
maBool mNeedDoubleBuffer
 double buffer on/off
 

Additional Inherited Members

- Static Public Member Functions inherited from CoreModifiable
static std::vector< CMSP > GetRootInstances (const KigsID &cid, bool exactTypeOnly=false)
 static method : return the set of all root instances of the given type
 
static void Append (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static void Export (const std::string &filename, CoreModifiable *toexport, bool recursive=false, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static XMLNodeExportToXMLNode (CoreModifiable *toexport, XML *owner_xml_file, bool recursive, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML Node. if recursive flag is set to true, export also all sons tree More...
 
static std::string ExportToXMLString (CoreModifiable *toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static void Export (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static CMSP Import (const std::string &filename, bool noInit=false, bool keepImportFileName=false, ImportState *state=nullptr, const std::string &override_name="")
 return an new CoreModifiable instance using the description found in XML file given by name
 
static CMSP GetInstanceByGlobalPath (const std::string &path)
 static method : return the instance corresponding to the given path, and given search start
 
static void debugPrintfFullTree (int maxindent=3)
 Editor. More...
 
- Static Protected Member Functions inherited from CoreModifiable
template<typename StringType >
static CMSP Import (XMLNodeTemplate< StringType > *currentNode, CoreModifiable *currentModifiable, ImportState &importState)
 recusrive method to add sons and attributes found in the XML file
 

Detailed Description

Generic "draw surface".

Attributes

Key : BitsForStencil (Init attribute)

Key : BitsPerPixel (Init attribute)

size of a pixel in bit

Key : BitsPerZ (Init attribute)

size of the Z value in bit

Key : FBOSizeX (Init attribute)

Key : FBOSizeY (Init attribute)

Key : IsOffScreen (Init attribute)

?

Key : ParentWindowName (Init attribute)

name of the parent windows

Key : UseFBO (Init attribute)

Key : VSync (Init attribute)

TRUE if I wait for the VSync.

Key : BackDropColor

back drop color

Key : Brightness

brightness : between -16 (black) and 16 (white)

Key : DesignSizeX

design size of the screen on x axis

Key : DesignSizeY

design size of the screen on y axis

Key : DontClear

indicate the screen don't need clear (camera should still clear their part of screen)

Key : IsStereo

Key : NeedDoubleBuffer

double buffer on/off

Key : Rotation

screen orientation (for handheld devices)

Key : SizeX

size of the screen on x axis

Key : SizeY

size of the screen on y axis

Methods

Key : GetDataInTouchSupport

convert touch pos in local "touch support" coordinates Convert posin : "global touch coordinates" to pout : local "touch support" coordinates

Key : IsValidTouchSupport

Key : Release

release the screen

Key : ResetContext

Key : SetActive

active the screen

Returns
return true if rendering screen can be activated

Key : Snapshot

Member Function Documentation

◆ GetDataInTouchSupport()

bool RenderingScreen::GetDataInTouchSupport ( const touchPosInfos &  posin,
touchPosInfos &  pout 
)

convert touch pos in local "touch support" coordinates

Convert posin : "global touch coordinates" to pout : local "touch support" coordinates

◆ GetDesignSize()

void RenderingScreen::GetDesignSize ( kfloat &  sizeX,
kfloat &  sizeY 
)
inline

get the design size of the screen : the resolution the graphics shown on screen were designed for

Parameters
dsizeX: design size on the x axis (in/out param)
dsizeY: design size on the y axis (in/out param)

◆ GetRotation()

void RenderingScreen::GetRotation ( kfloat &  rot)
inline

get the rotation of the screen

Parameters
rot: rotation of the screen(in/out param)

◆ GetSize()

void RenderingScreen::GetSize ( kfloat &  sizeX,
kfloat &  sizeY 
)
inline

get the size of the screen

Parameters
sizeX: size on the x axis (in/out param)
sizeY: size on the y axis (in/out param)

◆ InitModifiable()

void RenderingScreen::InitModifiable ( )
overrideprotectedvirtual

default modifiable init : set all initparams to readonly and set initflag to true

already done ? then return

Reimplemented from CoreModifiable.

Reimplemented in DX11RenderingScreen, and OpenGLRenderingScreen.

◆ IsInit()

bool RenderingScreen::IsInit ( )
inline

check if the screen has been initialized

Returns
TRUE if the screen has been initialized, FALSE if not

◆ Resize()

void RenderingScreen::Resize ( kfloat  sizeX,
kfloat  sizeY 
)
pure virtual

resize the screen

Parameters
sizeX: new size on the x axis
sizeY: new size on the y axis

Implemented in DX11RenderingScreen, OpenGLRenderingScreen, and OpenGLRenderingScreen.

◆ SetActive()

bool RenderingScreen::SetActive ( TravState state)
virtual

active the screen

Returns
return true if rendering screen can be activated

Reimplemented in DX11RenderingScreen, OpenGLRenderingScreen, and OpenGLRenderingScreen.

◆ SetWindowByHandle()

void RenderingScreen::SetWindowByHandle ( void *  PtrToHandle)
pure virtual

Set the target window handle of the rendering. If null, the Window name passed through "ParentWindowName" will be used.

Parameters
PtrToHandle: window handle

Implemented in DX11RenderingScreen, and OpenGLRenderingScreen.


The documentation for this class was generated from the following files: