orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
orxViewport.h
Go to the documentation of this file.
1/* Orx - Portable Game Engine
2 *
3 * Copyright (c) 2008- 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
32
42
43
44#ifndef _orxVIEWPORT_H_
45#define _orxVIEWPORT_H_
46
47#include "orxInclude.h"
48#include "core/orxClock.h"
49#include "render/orxCamera.h"
50#include "render/orxShader.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
63
64
67#define orxVIEWPORT_KU32_MAX_TEXTURE_NUMBER 8
68
69
71typedef struct __orxVIEWPORT_t orxVIEWPORT;
72
73
76typedef enum __orxVIEWPORT_EVENT_t
77{
79
81
83
85
86
89extern orxDLLAPI void orxFASTCALL orxViewport_Setup();
90
94
97extern orxDLLAPI void orxFASTCALL orxViewport_Exit();
98
99
104
109extern orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_CreateFromConfig(const orxSTRING _zConfigID);
110
115extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Delete(orxVIEWPORT *_pstViewport);
116
117
123extern orxDLLAPI void orxFASTCALL orxViewport_SetTextureList(orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList);
124
131extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_GetTextureList(const orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList);
132
137extern orxDLLAPI orxU32 orxFASTCALL orxViewport_GetTextureCount(const orxVIEWPORT *_pstViewport);
138
139
140
146extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBackgroundColor(orxVIEWPORT *_pstViewport, const orxCOLOR *_pstColor);
147
153
158extern orxDLLAPI orxBOOL orxFASTCALL orxViewport_HasBackgroundColor(const orxVIEWPORT *_pstViewport);
159
165extern orxDLLAPI orxCOLOR *orxFASTCALL orxViewport_GetBackgroundColor(const orxVIEWPORT *_pstViewport, orxCOLOR *_pstColor);
166
167
172extern orxDLLAPI void orxFASTCALL orxViewport_Enable(orxVIEWPORT *_pstViewport, orxBOOL _bEnable);
173
178extern orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsEnabled(const orxVIEWPORT *_pstViewport);
179
180
185extern orxDLLAPI void orxFASTCALL orxViewport_SetCamera(orxVIEWPORT *_pstViewport, orxCAMERA *_pstCamera);
186
191extern orxDLLAPI orxCAMERA *orxFASTCALL orxViewport_GetCamera(const orxVIEWPORT *_pstViewport);
192
193
199extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetShader(orxVIEWPORT *_pstViewport, orxSHADER *_pstShader);
200
206extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetShaderFromConfig(orxVIEWPORT *_pstViewport, const orxSTRING _zShaderID);
207
212extern orxDLLAPI void orxFASTCALL orxViewport_EnableShader(orxVIEWPORT *_pstViewport, orxBOOL _bEnable);
213
218extern orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsShaderEnabled(const orxVIEWPORT *_pstViewport);
219
224extern orxDLLAPI const orxSHADER *orxFASTCALL orxViewport_GetShader(const orxVIEWPORT *_pstViewport);
225
226
231extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBlendMode(orxVIEWPORT *_pstViewport, orxDISPLAY_BLEND_MODE _eBlendMode);
232
238
239
245extern orxDLLAPI void orxFASTCALL orxViewport_SetPosition(orxVIEWPORT *_pstViewport, orxFLOAT _fX, orxFLOAT _fY);
246
252extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativePosition(orxVIEWPORT *_pstViewport, orxU32 _u32AlignFlags);
253
259extern orxDLLAPI void orxFASTCALL orxViewport_GetPosition(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfX, orxFLOAT *_pfY);
260
261
267extern orxDLLAPI void orxFASTCALL orxViewport_SetSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight);
268
275extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativeSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight);
276
282extern orxDLLAPI void orxFASTCALL orxViewport_GetSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight);
283
289extern orxDLLAPI void orxFASTCALL orxViewport_GetRelativeSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight);
290
296extern orxDLLAPI orxAABOX *orxFASTCALL orxViewport_GetBox(const orxVIEWPORT *_pstViewport, orxAABOX *_pstBox);
297
302extern orxDLLAPI orxFLOAT orxFASTCALL orxViewport_GetCorrectionRatio(const orxVIEWPORT *_pstViewport);
303
308extern orxDLLAPI const orxSTRING orxFASTCALL orxViewport_GetName(const orxVIEWPORT *_pstViewport);
309
314extern orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_Get(const orxSTRING _zName);
315
316#endif /* _orxVIEWPORT_H_ */
317
#define orxDLLAPI
Definition orxDecl.h:381
orxDISPLAY_BLEND_MODE
Definition orxDisplay.h:198
#define orxCAMERA(STRUCTURE)
#define orxSHADER(STRUCTURE)
#define orxVIEWPORT(STRUCTURE)
#define orxTEXTURE(STRUCTURE)
orxSTATUS
Definition orxType.h:270
orxDLLAPI void orxFASTCALL orxViewport_SetTextureList(orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativePosition(orxVIEWPORT *_pstViewport, orxU32 _u32AlignFlags)
orxDLLAPI void orxFASTCALL orxViewport_SetSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight)
orxDLLAPI orxFLOAT orxFASTCALL orxViewport_GetCorrectionRatio(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxU32 orxFASTCALL orxViewport_GetTextureCount(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxBOOL orxFASTCALL orxViewport_HasBackgroundColor(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxCOLOR *orxFASTCALL orxViewport_GetBackgroundColor(const orxVIEWPORT *_pstViewport, orxCOLOR *_pstColor)
orxDLLAPI const orxSHADER *orxFASTCALL orxViewport_GetShader(const orxVIEWPORT *_pstViewport)
orxDLLAPI void orxFASTCALL orxViewport_GetSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight)
orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsShaderEnabled(const orxVIEWPORT *_pstViewport)
orxDLLAPI void orxFASTCALL orxViewport_EnableShader(orxVIEWPORT *_pstViewport, orxBOOL _bEnable)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBlendMode(orxVIEWPORT *_pstViewport, orxDISPLAY_BLEND_MODE _eBlendMode)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_ClearBackgroundColor(orxVIEWPORT *_pstViewport)
orxDLLAPI void orxFASTCALL orxViewport_SetPosition(orxVIEWPORT *_pstViewport, orxFLOAT _fX, orxFLOAT _fY)
orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsEnabled(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBackgroundColor(orxVIEWPORT *_pstViewport, const orxCOLOR *_pstColor)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetShaderFromConfig(orxVIEWPORT *_pstViewport, const orxSTRING _zShaderID)
orxDLLAPI void orxFASTCALL orxViewport_Exit()
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Init()
orxDLLAPI const orxSTRING orxFASTCALL orxViewport_GetName(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxViewport_GetBlendMode(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_GetTextureList(const orxVIEWPORT *_pstViewport, orxU32 _u32TextureNumber, orxTEXTURE **_apstTextureList)
orxDLLAPI orxAABOX *orxFASTCALL orxViewport_GetBox(const orxVIEWPORT *_pstViewport, orxAABOX *_pstBox)
orxDLLAPI void orxFASTCALL orxViewport_GetPosition(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfX, orxFLOAT *_pfY)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetShader(orxVIEWPORT *_pstViewport, orxSHADER *_pstShader)
orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_CreateFromConfig(const orxSTRING _zConfigID)
orxDLLAPI void orxFASTCALL orxViewport_Enable(orxVIEWPORT *_pstViewport, orxBOOL _bEnable)
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativeSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight)
orxVIEWPORT_EVENT
Definition orxViewport.h:77
orxDLLAPI orxCAMERA *orxFASTCALL orxViewport_GetCamera(const orxVIEWPORT *_pstViewport)
orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_Get(const orxSTRING _zName)
orxDLLAPI void orxFASTCALL orxViewport_SetCamera(orxVIEWPORT *_pstViewport, orxCAMERA *_pstCamera)
orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_Create()
orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Delete(orxVIEWPORT *_pstViewport)
orxDLLAPI void orxFASTCALL orxViewport_Setup()
orxDLLAPI void orxFASTCALL orxViewport_GetRelativeSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight)
@ orxVIEWPORT_EVENT_NUMBER
Definition orxViewport.h:80
@ orxVIEWPORT_EVENT_NONE
Definition orxViewport.h:82
@ orxVIEWPORT_EVENT_RESIZE
Definition orxViewport.h:78

Generated for orx by doxygen 1.8.11