orx  1.14
Portable Game Engine
orxViewport.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2022 Orx-Project
4  *
5  * This software is provided 'as-is', without any express or implied
6  * warranty. In no event will the authors be held liable for any damages
7  * arising from the use of this software.
8  *
9  * Permission is granted to anyone to use this software for any purpose,
10  * including commercial applications, and to alter it and redistribute it
11  * freely, subject to the following restrictions:
12  *
13  * 1. The origin of this software must not be misrepresented; you must not
14  * claim that you wrote the original software. If you use this software
15  * in a product, an acknowledgment in the product documentation would be
16  * appreciated but is not required.
17  *
18  * 2. Altered source versions must be plainly marked as such, and must not be
19  * misrepresented as being the original software.
20  *
21  * 3. This notice may not be removed or altered from any source
22  * distribution.
23  */
24 
44 #ifndef _orxVIEWPORT_H_
45 #define _orxVIEWPORT_H_
46 
47 #include "orxInclude.h"
48 #include "core/orxClock.h"
49 #include "render/orxCamera.h"
51 #include "display/orxDisplay.h"
52 #include "display/orxTexture.h"
53 
54 
57 #define orxVIEWPORT_KU32_FLAG_ALIGN_CENTER 0x00000000
58 #define orxVIEWPORT_KU32_FLAG_ALIGN_LEFT 0x10000000
59 #define orxVIEWPORT_KU32_FLAG_ALIGN_RIGHT 0x20000000
60 #define orxVIEWPORT_KU32_FLAG_ALIGN_TOP 0x40000000
61 #define orxVIEWPORT_KU32_FLAG_ALIGN_BOTTOM 0x80000000
62 #define orxVIEWPORT_KU32_FLAG_NO_DEBUG 0x01000000
67 #define orxVIEWPORT_KU32_MAX_TEXTURE_NUMBER 8
68 
69 
71 typedef struct __orxVIEWPORT_t orxVIEWPORT;
72 
73 
76 typedef enum __orxVIEWPORT_EVENT_t
77 {
81 
82  orxVIEWPORT_EVENT_NONE = orxENUM_NONE
83 
85 
86 
89 extern orxDLLAPI void orxFASTCALL orxViewport_Setup();
90 
93 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Init();
94 
97 extern orxDLLAPI void orxFASTCALL orxViewport_Exit();
98 
99 
103 extern orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_Create();
104 
109 extern orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_CreateFromConfig(const orxSTRING _zConfigID);
110 
115 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Delete(orxVIEWPORT *_pstViewport);
116 
117 
123 extern orxDLLAPI void orxFASTCALL orxViewport_SetTextureList(orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList);
124 
131 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_GetTextureList(const orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList);
132 
137 extern orxDLLAPI orxU32 orxFASTCALL orxViewport_GetTextureCount(const orxVIEWPORT *_pstViewport);
138 
139 
140 
146 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBackgroundColor(orxVIEWPORT *_pstViewport, const orxCOLOR *_pstColor);
147 
152 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_ClearBackgroundColor(orxVIEWPORT *_pstViewport);
153 
158 extern orxDLLAPI orxBOOL orxFASTCALL orxViewport_HasBackgroundColor(const orxVIEWPORT *_pstViewport);
159 
165 extern orxDLLAPI orxCOLOR *orxFASTCALL orxViewport_GetBackgroundColor(const orxVIEWPORT *_pstViewport, orxCOLOR *_pstColor);
166 
167 
172 extern orxDLLAPI void orxFASTCALL orxViewport_Enable(orxVIEWPORT *_pstViewport, orxBOOL _bEnable);
173 
178 extern orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsEnabled(const orxVIEWPORT *_pstViewport);
179 
180 
185 extern orxDLLAPI void orxFASTCALL orxViewport_SetCamera(orxVIEWPORT *_pstViewport, orxCAMERA *_pstCamera);
186 
191 extern orxDLLAPI orxCAMERA *orxFASTCALL orxViewport_GetCamera(const orxVIEWPORT *_pstViewport);
192 
193 
199 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_AddShader(orxVIEWPORT *_pstViewport, const orxSTRING _zShaderConfigID);
200 
206 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_RemoveShader(orxVIEWPORT *_pstViewport, const orxSTRING _zShaderConfigID);
207 
212 extern orxDLLAPI void orxFASTCALL orxViewport_EnableShader(orxVIEWPORT *_pstViewport, orxBOOL _bEnable);
213 
218 extern orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsShaderEnabled(const orxVIEWPORT *_pstViewport);
219 
224 extern orxDLLAPI const orxSHADERPOINTER *orxFASTCALL orxViewport_GetShaderPointer(const orxVIEWPORT *_pstViewport);
225 
226 
231 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBlendMode(orxVIEWPORT *_pstViewport, orxDISPLAY_BLEND_MODE _eBlendMode);
232 
237 extern orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxViewport_GetBlendMode(const orxVIEWPORT *_pstViewport);
238 
239 
245 extern orxDLLAPI void orxFASTCALL orxViewport_SetPosition(orxVIEWPORT *_pstViewport, orxFLOAT _fX, orxFLOAT _fY);
246 
252 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativePosition(orxVIEWPORT *_pstViewport, orxU32 _u32AlignFlags);
253 
259 extern orxDLLAPI void orxFASTCALL orxViewport_GetPosition(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfX, orxFLOAT *_pfY);
260 
261 
267 extern orxDLLAPI void orxFASTCALL orxViewport_SetSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight);
268 
275 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativeSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight);
276 
282 extern orxDLLAPI void orxFASTCALL orxViewport_GetSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight);
283 
289 extern orxDLLAPI void orxFASTCALL orxViewport_GetRelativeSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight);
290 
296 extern orxDLLAPI orxAABOX *orxFASTCALL orxViewport_GetBox(const orxVIEWPORT *_pstViewport, orxAABOX *_pstBox);
297 
302 extern orxDLLAPI orxFLOAT orxFASTCALL orxViewport_GetCorrectionRatio(const orxVIEWPORT *_pstViewport);
303 
308 extern orxDLLAPI const orxSTRING orxFASTCALL orxViewport_GetName(const orxVIEWPORT *_pstViewport);
309 
314 extern orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_Get(const orxSTRING _zName);
315 
316 #endif /* _orxVIEWPORT_H_ */
317 
orxDLLAPI const orxSHADERPOINTER *orxFASTCALL orxViewport_GetShaderPointer(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsShaderEnabled(const orxVIEWPORT *_pstViewport)
orxDLLAPI void orxFASTCALL orxViewport_Exit()
struct __orxTEXTURE_t orxTEXTURE
Definition: orxTexture.h:78
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_AddShader(orxVIEWPORT *_pstViewport, const orxSTRING _zShaderConfigID)
orxDLLAPI orxBOOL orxFASTCALL orxViewport_HasBackgroundColor(const orxVIEWPORT *_pstViewport)
struct __orxCAMERA_t orxCAMERA
Definition: orxCamera.h:72
orxVIEWPORT_EVENT
Definition: orxViewport.h:76
orxDLLAPI orxFLOAT orxFASTCALL orxViewport_GetCorrectionRatio(const orxVIEWPORT *_pstViewport)
orxDLLAPI void orxFASTCALL orxViewport_GetRelativeSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Delete(orxVIEWPORT *_pstViewport)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativeSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight)
orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_CreateFromConfig(const orxSTRING _zConfigID)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBlendMode(orxVIEWPORT *_pstViewport, orxDISPLAY_BLEND_MODE _eBlendMode)
orxDLLAPI orxCAMERA *orxFASTCALL orxViewport_GetCamera(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativePosition(orxVIEWPORT *_pstViewport, orxU32 _u32AlignFlags)
orxDLLAPI void orxFASTCALL orxViewport_SetCamera(orxVIEWPORT *_pstViewport, orxCAMERA *_pstCamera)
orxDLLAPI void orxFASTCALL orxViewport_SetPosition(orxVIEWPORT *_pstViewport, orxFLOAT _fX, orxFLOAT _fY)
orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsEnabled(const orxVIEWPORT *_pstViewport)
orxDLLAPI void orxFASTCALL orxViewport_SetSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight)
orxDLLAPI void orxFASTCALL orxViewport_Enable(orxVIEWPORT *_pstViewport, orxBOOL _bEnable)
orxSTATUS
Definition: orxType.h:256
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_GetTextureList(const orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList)
orxDLLAPI orxAABOX *orxFASTCALL orxViewport_GetBox(const orxVIEWPORT *_pstViewport, orxAABOX *_pstBox)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_ClearBackgroundColor(orxVIEWPORT *_pstViewport)
#define orxDLLAPI
Definition: orxDecl.h:370
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_RemoveShader(orxVIEWPORT *_pstViewport, const orxSTRING _zShaderConfigID)
orxDISPLAY_BLEND_MODE
Definition: orxDisplay.h:181
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBackgroundColor(orxVIEWPORT *_pstViewport, const orxCOLOR *_pstColor)
orxDLLAPI orxCOLOR *orxFASTCALL orxViewport_GetBackgroundColor(const orxVIEWPORT *_pstViewport, orxCOLOR *_pstColor)
orxDLLAPI const orxSTRING orxFASTCALL orxViewport_GetName(const orxVIEWPORT *_pstViewport)
orxDLLAPI void orxFASTCALL orxViewport_SetTextureList(orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList)
struct __orxSHADERPOINTER_t orxSHADERPOINTER
orxDLLAPI void orxFASTCALL orxViewport_GetSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight)
orxDLLAPI void orxFASTCALL orxViewport_EnableShader(orxVIEWPORT *_pstViewport, orxBOOL _bEnable)
orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_Get(const orxSTRING _zName)
orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxViewport_GetBlendMode(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Init()
orxDLLAPI void orxFASTCALL orxViewport_GetPosition(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfX, orxFLOAT *_pfY)
orxDLLAPI orxU32 orxFASTCALL orxViewport_GetTextureCount(const orxVIEWPORT *_pstViewport)
struct __orxVIEWPORT_t orxVIEWPORT
Definition: orxViewport.h:71
orxDLLAPI void orxFASTCALL orxViewport_Setup()
orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_Create()

Generated for orx by doxygen 1.8.11