00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef FLGRAPHICS_H
00011 #define FLGRAPHICS_H
00012
00013 #include "flGlobal.h"
00014
00015 #if FL_GRAPHICS
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00025 extern bool graphicsVSync;
00026
00027 #if FL_GRAPHICS_DISPLAYLIST_STATIC
00028
00031 extern u32 __attribute__((aligned(16))) graphicsDisplayList[((FL_GRAPHICS_DISPLAYLIST_SIZE + 15) & ~15) >> 1];
00032
00036 extern u32 __attribute__((aligned(16))) graphicsDisplayListCache[256];
00037 #else
00038
00042 extern void* graphicsDisplayList;
00043
00047 extern void* graphicsDisplayListCache;
00048 #endif
00049
00052 extern u8 graphicsDisplayListCurrent;
00053
00057 extern void* graphicsDrawBuffer;
00058
00062 extern void* graphicsDispBuffer;
00063
00067 extern void* graphicsDepthBuffer;
00068
00069
00070
00074 extern bool graphicsLinesAntiAlias;
00075
00080 extern bool graphicsWireframe;
00081
00082
00083
00084 #if FL_TIMER
00085
00088 extern float graphicsFPS;
00089
00093 extern bool graphicsFPSShow;
00094 #endif
00095
00096
00097
00102 extern bool graphicsFrame;
00103
00107 extern void* graphicsRenderTarget;
00108
00112 extern int graphicsRenderTargetStride;
00113
00117 extern u8 graphicsRenderTargetPixelFormat;
00118
00119
00120
00125 extern void* graphicsDispListCur();
00126
00131 extern void* graphicsDispListLast();
00132
00133
00138 extern void graphicsInit();
00139
00144 extern void graphicsTerm();
00145
00152 extern void graphicsSwapBuffers();
00153
00154
00155
00161 extern void graphicsSetProjection();
00162
00167 extern void graphicsBeginOrtho();
00168
00173 extern void graphicsEndOrtho();
00174
00179 extern void graphicsSetLinesAntiAlias(bool inValue);
00180
00184 extern void graphicsRenderToFramebuffer();
00185
00193 extern bool graphicsRenderToVmem(void* inPtr, int inStride, u8 inPixelFormat);
00194
00195
00201 extern u8 graphicsPixelFormatBPP(u8 inPixelFormat);
00202
00212 extern u8* graphicsSwizzleData(u8* inData, u32 inWidth, u32 inHeight, u8 inPixelFormat);
00213
00223 extern u8* graphicsUnswizzleData(u8* inData, u32 inWidth, u32 inHeight, u8 inPixelFormat);
00224
00225 #if FL_TEXTURE
00226
00232 #define graphicsRenderToTexture(inTex) graphicsRenderToVmem((inTex)->texData, (inTex)->texDataWidth, (inTex)->texPixelFormat)
00233 #endif
00234
00235
00236 #ifdef __cplusplus
00237 }
00238 #endif
00239
00240 #endif
00241
00242 #endif