orx  stable
Portable Game Engine
OrxViewport

Macros

#define orxVIEWPORT_KU32_FLAG_ALIGN_BOTTOM   0x80000000
 
#define orxVIEWPORT_KU32_FLAG_ALIGN_CENTER   0x00000000
 
#define orxVIEWPORT_KU32_FLAG_ALIGN_LEFT   0x10000000
 
#define orxVIEWPORT_KU32_FLAG_ALIGN_RIGHT   0x20000000
 
#define orxVIEWPORT_KU32_FLAG_ALIGN_TOP   0x40000000
 
#define orxVIEWPORT_KU32_FLAG_NO_DEBUG   0x01000000
 
#define orxVIEWPORT_KU32_MAX_TEXTURE_NUMBER   8
 

Typedefs

typedef struct __orxVIEWPORT_t orxVIEWPORT
 

Enumerations

enum  orxVIEWPORT_EVENT { orxVIEWPORT_EVENT_RESIZE = 0, orxVIEWPORT_EVENT_NUMBER, orxVIEWPORT_EVENT_NONE = orxENUM_NONE }
 

Functions

orxDLLAPI orxSTATUS orxFASTCALL orxViewport_AddShader (orxVIEWPORT *_pstViewport, const orxSTRING _zShaderConfigID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_ClearBackgroundColor (orxVIEWPORT *_pstViewport)
 
orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_Create ()
 
orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_CreateFromConfig (const orxSTRING _zConfigID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Delete (orxVIEWPORT *_pstViewport)
 
orxDLLAPI void orxFASTCALL orxViewport_Enable (orxVIEWPORT *_pstViewport, orxBOOL _bEnable)
 
orxDLLAPI void orxFASTCALL orxViewport_EnableShader (orxVIEWPORT *_pstViewport, orxBOOL _bEnable)
 
orxDLLAPI void orxFASTCALL orxViewport_Exit ()
 
orxDLLAPI orxCOLOR *orxFASTCALL orxViewport_GetBackgroundColor (const orxVIEWPORT *_pstViewport, orxCOLOR *_pstColor)
 
orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxViewport_GetBlendMode (const orxVIEWPORT *_pstViewport)
 
orxDLLAPI orxAABOX *orxFASTCALL orxViewport_GetBox (const orxVIEWPORT *_pstViewport, orxAABOX *_pstBox)
 
orxDLLAPI orxCAMERA *orxFASTCALL orxViewport_GetCamera (const orxVIEWPORT *_pstViewport)
 
orxDLLAPI orxFLOAT orxFASTCALL orxViewport_GetCorrectionRatio (const orxVIEWPORT *_pstViewport)
 
orxDLLAPI const orxSTRING orxFASTCALL orxViewport_GetName (const orxVIEWPORT *_pstViewport)
 
orxDLLAPI void orxFASTCALL orxViewport_GetPosition (const orxVIEWPORT *_pstViewport, orxFLOAT *_pfX, orxFLOAT *_pfY)
 
orxDLLAPI void orxFASTCALL orxViewport_GetRelativeSize (const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight)
 
orxDLLAPI const orxSHADERPOINTER *orxFASTCALL orxViewport_GetShaderPointer (const orxVIEWPORT *_pstViewport)
 
orxDLLAPI void orxFASTCALL orxViewport_GetSize (const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight)
 
orxDLLAPI orxU32 orxFASTCALL orxViewport_GetTextureCounter (const orxVIEWPORT *_pstViewport)
 
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_GetTextureList (const orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList)
 
orxDLLAPI orxBOOL orxFASTCALL orxViewport_HasBackgroundColor (const orxVIEWPORT *_pstViewport)
 
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Init ()
 
orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsEnabled (const orxVIEWPORT *_pstViewport)
 
orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsShaderEnabled (const orxVIEWPORT *_pstViewport)
 
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_RemoveShader (orxVIEWPORT *_pstViewport, const orxSTRING _zShaderConfigID)
 
orxDLLAPI void orxFASTCALL orxViewport_SetAlignment (orxVIEWPORT *_pstViewport, orxU32 _u32AlignFlags)
 
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBackgroundColor (orxVIEWPORT *_pstViewport, const orxCOLOR *_pstColor)
 
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBlendMode (orxVIEWPORT *_pstViewport, orxDISPLAY_BLEND_MODE _eBlendMode)
 
orxDLLAPI void orxFASTCALL orxViewport_SetCamera (orxVIEWPORT *_pstViewport, orxCAMERA *_pstCamera)
 
orxDLLAPI void orxFASTCALL orxViewport_SetPosition (orxVIEWPORT *_pstViewport, orxFLOAT _fX, orxFLOAT _fY)
 
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativePosition (orxVIEWPORT *_pstViewport, orxU32 _u32AlignFlags)
 
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativeSize (orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight)
 
orxDLLAPI void orxFASTCALL orxViewport_SetSize (orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight)
 
orxDLLAPI void orxFASTCALL orxViewport_SetTextureList (orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList)
 
orxDLLAPI void orxFASTCALL orxViewport_Setup ()
 

Detailed Description

Viewport module Allows to creates and handle viewports. Viewports are structures associated to cameras and used for rendering.

Macro Definition Documentation

#define orxVIEWPORT_KU32_FLAG_ALIGN_BOTTOM   0x80000000

Bottom vertical alignment

Definition at line 61 of file orxViewport.h.

#define orxVIEWPORT_KU32_FLAG_ALIGN_CENTER   0x00000000

Viewport flagsCenter vertical / horizontal alignment

Definition at line 57 of file orxViewport.h.

#define orxVIEWPORT_KU32_FLAG_ALIGN_LEFT   0x10000000

Left horizontal alignment

Definition at line 58 of file orxViewport.h.

#define orxVIEWPORT_KU32_FLAG_ALIGN_RIGHT   0x20000000

Right horizontal alignment

Definition at line 59 of file orxViewport.h.

#define orxVIEWPORT_KU32_FLAG_ALIGN_TOP   0x40000000

Top vertical alignment

Definition at line 60 of file orxViewport.h.

#define orxVIEWPORT_KU32_FLAG_NO_DEBUG   0x01000000

No debug flag

Definition at line 62 of file orxViewport.h.

#define orxVIEWPORT_KU32_MAX_TEXTURE_NUMBER   8

Misc defined

Definition at line 67 of file orxViewport.h.

Typedef Documentation

typedef struct __orxVIEWPORT_t orxVIEWPORT

Internal Viewport structure

Definition at line 71 of file orxViewport.h.

Enumeration Type Documentation

Event enum

Enumerator
orxVIEWPORT_EVENT_RESIZE 

Event sent when a viewport has been resized

orxVIEWPORT_EVENT_NUMBER 
orxVIEWPORT_EVENT_NONE 

Definition at line 76 of file orxViewport.h.

Function Documentation

orxDLLAPI orxSTATUS orxFASTCALL orxViewport_AddShader ( orxVIEWPORT _pstViewport,
const orxSTRING  _zShaderConfigID 
)

Adds a shader to a viewport using its config ID

Parameters
[in]_pstViewportConcerned viewport
[in]_zShaderConfigIDConfig ID of the shader to add
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_ClearBackgroundColor ( orxVIEWPORT _pstViewport)

Clears viewport background color

Parameters
[in]_pstViewportConcerned viewport
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxVIEWPORT* orxFASTCALL orxViewport_Create ( )

Creates a viewport

Returns
Created orxVIEWPORT / orxNULL
orxDLLAPI orxVIEWPORT* orxFASTCALL orxViewport_CreateFromConfig ( const orxSTRING  _zConfigID)

Creates a viewport from config

Parameters
[in]_zConfigIDConfig ID @ return orxVIEWPORT / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Delete ( orxVIEWPORT _pstViewport)

Deletes a viewport

Parameters
[in]_pstViewportViewport to delete
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxViewport_Enable ( orxVIEWPORT _pstViewport,
orxBOOL  _bEnable 
)

Enables / disables a viewport

Parameters
[in]_pstViewportConcerned viewport
[in]_bEnableEnable / disable
orxDLLAPI void orxFASTCALL orxViewport_EnableShader ( orxVIEWPORT _pstViewport,
orxBOOL  _bEnable 
)

Enables a viewport's shader

Parameters
[in]_pstViewportConcerned viewport
[in]_bEnableEnable / disable
orxDLLAPI void orxFASTCALL orxViewport_Exit ( )

Exits from the viewport module

orxDLLAPI orxCOLOR* orxFASTCALL orxViewport_GetBackgroundColor ( const orxVIEWPORT _pstViewport,
orxCOLOR _pstColor 
)

Gets a viewport background color

Parameters
[in]_pstViewportConcerned viewport
[out]_pstColorViewport's color
Returns
Current background color
orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxViewport_GetBlendMode ( const orxVIEWPORT _pstViewport)

Gets a viewport blend mode

Parameters
[in]_pstViewportConcerned viewport
Returns
orxDISPLAY_BLEND_MODE
orxDLLAPI orxAABOX* orxFASTCALL orxViewport_GetBox ( const orxVIEWPORT _pstViewport,
orxAABOX _pstBox 
)

Gets an axis aligned box of viewport

Parameters
[in]_pstViewportConcerned viewport
[out]_pstBoxOutput box
Returns
orxAABOX / orxNULL
orxDLLAPI orxCAMERA* orxFASTCALL orxViewport_GetCamera ( const orxVIEWPORT _pstViewport)

Gets a viewport camera

Parameters
[in]_pstViewportConcerned viewport
Returns
Associated camera / orxNULL
orxDLLAPI orxFLOAT orxFASTCALL orxViewport_GetCorrectionRatio ( const orxVIEWPORT _pstViewport)

Get viewport correction ratio

Parameters
[in]_pstViewportConcerned viewport
Returns
Correction ratio value
orxDLLAPI const orxSTRING orxFASTCALL orxViewport_GetName ( const orxVIEWPORT _pstViewport)

Gets viewport config name

Parameters
[in]_pstViewportConcerned viewport
Returns
orxSTRING / orxSTRING_EMPTY
orxDLLAPI void orxFASTCALL orxViewport_GetPosition ( const orxVIEWPORT _pstViewport,
orxFLOAT *  _pfX,
orxFLOAT *  _pfY 
)

Gets a viewport position

Parameters
[in]_pstViewportConcerned viewport
[out]_pfXX axis position (top left corner)
[out]_pfYY axis position (top left corner)
orxDLLAPI void orxFASTCALL orxViewport_GetRelativeSize ( const orxVIEWPORT _pstViewport,
orxFLOAT *  _pfWidth,
orxFLOAT *  _pfHeight 
)

Gets a viewport relative size

Parameters
[in]_pstViewportConcerned viewport
[out]_pfWidthRelative width
[out]_pfHeightRelative height
orxDLLAPI const orxSHADERPOINTER* orxFASTCALL orxViewport_GetShaderPointer ( const orxVIEWPORT _pstViewport)

Gets a viewport's shader pointer

Parameters
[in]_pstViewportConcerned viewport
Returns
orxSHADERPOINTER / orxNULL
orxDLLAPI void orxFASTCALL orxViewport_GetSize ( const orxVIEWPORT _pstViewport,
orxFLOAT *  _pfWidth,
orxFLOAT *  _pfHeight 
)

Gets a viewport size

Parameters
[in]_pstViewportConcerned viewport
[out]_pfWidthWidth
[out]_pfHeightHeight
orxDLLAPI orxU32 orxFASTCALL orxViewport_GetTextureCounter ( const orxVIEWPORT _pstViewport)

Gets a viewport texture counter

Parameters
[in]_pstViewportConcerned viewport
Returns
Number of textures associated with the viewport
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_GetTextureList ( const orxVIEWPORT _pstViewport,
orxU32  _u32TextureNumber,
orxTEXTURE **  _apstTextureList 
)

Gets a viewport texture list

Parameters
[in]_pstViewportConcerned viewport
[in]_u32TextureNumberNumber of textures to be retrieved
[out]_apstTextureListList of textures associated with the viewport
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxBOOL orxFASTCALL orxViewport_HasBackgroundColor ( const orxVIEWPORT _pstViewport)

Viewport has background color accessor

Parameters
[in]_pstViewportConcerned viewport
Returns
orxTRUE / orxFALSE
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Init ( )

Inits the viewport module

orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsEnabled ( const orxVIEWPORT _pstViewport)

Is a viewport enabled?

Parameters
[in]_pstViewportConcerned viewport
Returns
orxTRUE / orxFALSE
orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsShaderEnabled ( const orxVIEWPORT _pstViewport)

Is a viewport's shader enabled?

Parameters
[in]_pstViewportConcerned viewport
Returns
orxTRUE if enabled, orxFALSE otherwise
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_RemoveShader ( orxVIEWPORT _pstViewport,
const orxSTRING  _zShaderConfigID 
)

Removes a shader using its config ID

Parameters
[in]_pstViewportConcerned viewport
[in]_zShaderConfigIDConfig ID of the shader to remove
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxViewport_SetAlignment ( orxVIEWPORT _pstViewport,
orxU32  _u32AlignFlags 
)

Sets a viewport alignment

Parameters
[in]_pstViewportConcerned viewport
[in]_u32AlignFlagsAlignment flags (must be OR'ed)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBackgroundColor ( orxVIEWPORT _pstViewport,
const orxCOLOR _pstColor 
)

Sets a viewport background color

Parameters
[in]_pstViewportConcerned viewport
[in]_pstColorColor to use for background
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBlendMode ( orxVIEWPORT _pstViewport,
orxDISPLAY_BLEND_MODE  _eBlendMode 
)

Sets a viewport blend mode (only used when has active shaders attached)

Parameters
[in]_pstViewportConcerned viewport
[in]_eBlendModeBlend mode to set
orxDLLAPI void orxFASTCALL orxViewport_SetCamera ( orxVIEWPORT _pstViewport,
orxCAMERA _pstCamera 
)

Sets a viewport camera

Parameters
[in]_pstViewportConcerned viewport
[in]_pstCameraAssociated camera
orxDLLAPI void orxFASTCALL orxViewport_SetPosition ( orxVIEWPORT _pstViewport,
orxFLOAT  _fX,
orxFLOAT  _fY 
)

Sets a viewport position

Parameters
[in]_pstViewportConcerned viewport
[in]_fXX axis position (top left corner)
[in]_fYY axis position (top left corner)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativePosition ( orxVIEWPORT _pstViewport,
orxU32  _u32AlignFlags 
)

Sets a viewport relative position

Parameters
[in]_pstViewportConcerned viewport
[in]_u32AlignFlagsAlignment flags
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativeSize ( orxVIEWPORT _pstViewport,
orxFLOAT  _fWidth,
orxFLOAT  _fHeight 
)

Sets a viewport relative size

Parameters
[in]_pstViewportConcerned viewport
[in]_fWidthRelative width (0.0f - 1.0f)
[in]_fHeightRelative height (0.0f - 1.0f)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxViewport_SetSize ( orxVIEWPORT _pstViewport,
orxFLOAT  _fWidth,
orxFLOAT  _fHeight 
)

Sets a viewport size

Parameters
[in]_pstViewportConcerned viewport
[in]_fWidthWidth
[in]_fHeightHeight
orxDLLAPI void orxFASTCALL orxViewport_SetTextureList ( orxVIEWPORT _pstViewport,
orxU32  _u32TextureNumber,
orxTEXTURE **  _apstTextureList 
)

Sets a viewport texture list

Parameters
[in]_pstViewportConcerned viewport
[in]_u32TextureNumberNumber of textures to associate with the viewport
[in]_apstTextureListList of textures to associate with the viewport
orxDLLAPI void orxFASTCALL orxViewport_Setup ( )

Viewport module setup


Generated for orx by doxygen 1.5.6