Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00044 #ifndef _orxVIEWPORT_H_
00045 #define _orxVIEWPORT_H_
00046
00047 #include "orxInclude.h"
00048 #include "core/orxClock.h"
00049 #include "render/orxCamera.h"
00050 #include "render/orxShaderPointer.h"
00051 #include "display/orxTexture.h"
00052
00053
00056 #define orxVIEWPORT_KU32_FLAG_ALIGN_CENTER 0x00000000
00057 #define orxVIEWPORT_KU32_FLAG_ALIGN_LEFT 0x10000000
00058 #define orxVIEWPORT_KU32_FLAG_ALIGN_RIGHT 0x20000000
00059 #define orxVIEWPORT_KU32_FLAG_ALIGN_TOP 0x40000000
00060 #define orxVIEWPORT_KU32_FLAG_ALIGN_BOTTOM 0x80000000
00064 typedef struct __orxVIEWPORT_t orxVIEWPORT;
00065
00066
00069 extern orxDLLAPI void orxFASTCALL orxViewport_Setup();
00070
00073 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Init();
00074
00077 extern orxDLLAPI void orxFASTCALL orxViewport_Exit();
00078
00079
00083 extern orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_Create();
00084
00089 extern orxDLLAPI orxVIEWPORT *orxFASTCALL orxViewport_CreateFromConfig(const orxSTRING _zConfigID);
00090
00095 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_Delete(orxVIEWPORT *_pstViewport);
00096
00097
00102 extern orxDLLAPI void orxFASTCALL orxViewport_SetAlignment(orxVIEWPORT *_pstViewport, orxU32 _u32AlignFlags);
00103
00104
00109 extern orxDLLAPI void orxFASTCALL orxViewport_SetTexture(orxVIEWPORT *_pstViewport, orxTEXTURE *_pstTexture);
00110
00115 extern orxDLLAPI orxTEXTURE *orxFASTCALL orxViewport_GetTexture(const orxVIEWPORT *_pstViewport);
00116
00117
00123 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetBackgroundColor(orxVIEWPORT *_pstViewport, const orxCOLOR *_pstColor);
00124
00129 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_ClearBackgroundColor(orxVIEWPORT *_pstViewport);
00130
00135 extern orxDLLAPI orxBOOL orxFASTCALL orxViewport_HasBackgroundColor(const orxVIEWPORT *_pstViewport);
00136
00142 extern orxDLLAPI orxCOLOR *orxFASTCALL orxViewport_GetBackgroundColor(const orxVIEWPORT *_pstViewport, orxCOLOR *_pstColor);
00143
00144
00149 extern orxDLLAPI void orxFASTCALL orxViewport_Enable(orxVIEWPORT *_pstViewport, orxBOOL _bEnable);
00150
00155 extern orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsEnabled(const orxVIEWPORT *_pstViewport);
00156
00157
00162 extern orxDLLAPI void orxFASTCALL orxViewport_SetCamera(orxVIEWPORT *_pstViewport, orxCAMERA *_pstCamera);
00163
00168 extern orxDLLAPI orxCAMERA *orxFASTCALL orxViewport_GetCamera(const orxVIEWPORT *_pstViewport);
00169
00170
00176 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_AddShader(orxVIEWPORT *_pstViewport, const orxSTRING _zShaderConfigID);
00177
00183 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_RemoveShader(orxVIEWPORT *_pstViewport, const orxSTRING _zShaderConfigID);
00184
00189 extern orxDLLAPI void orxFASTCALL orxViewport_EnableShader(orxVIEWPORT *_pstViewport, orxBOOL _bEnable);
00190
00195 extern orxDLLAPI orxBOOL orxFASTCALL orxViewport_IsShaderEnabled(const orxVIEWPORT *_pstViewport);
00196
00201 extern orxDLLAPI const orxSHADERPOINTER *orxFASTCALL orxViewport_GetShaderPointer(const orxVIEWPORT *_pstViewport);
00202
00203
00209 extern orxDLLAPI void orxFASTCALL orxViewport_SetPosition(orxVIEWPORT *_pstViewport, orxFLOAT _fX, orxFLOAT _fY);
00210
00216 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativePosition(orxVIEWPORT *_pstViewport, orxU32 _u32AlignFlags);
00217
00223 extern orxDLLAPI void orxFASTCALL orxViewport_GetPosition(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfX, orxFLOAT *_pfY);
00224
00225
00231 extern orxDLLAPI void orxFASTCALL orxViewport_SetSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight);
00232
00239 extern orxDLLAPI orxSTATUS orxFASTCALL orxViewport_SetRelativeSize(orxVIEWPORT *_pstViewport, orxFLOAT _fWidth, orxFLOAT _fHeight);
00240
00246 extern orxDLLAPI void orxFASTCALL orxViewport_GetSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight);
00247
00253 extern orxDLLAPI void orxFASTCALL orxViewport_GetRelativeSize(const orxVIEWPORT *_pstViewport, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight);
00254
00260 extern orxDLLAPI orxAABOX *orxFASTCALL orxViewport_GetBox(const orxVIEWPORT *_pstViewport, orxAABOX *_pstBox);
00261
00266 extern orxDLLAPI orxFLOAT orxFASTCALL orxViewport_GetCorrectionRatio(const orxVIEWPORT *_pstViewport);
00267
00268 #endif
00269