00001 #ifndef __BLENDERGL
00002 #define __BLENDERGL
00003
00004 #ifdef __cplusplus
00005 extern "C" {
00006 #endif //__cplusplus
00007
00008 typedef float BL_Mat4x4[4][4];
00009
00010
00011 void BL_RestoreState();
00012 int BL_SaveState();
00013
00014
00015 void BL_FixedUpdate();
00016
00017
00018 void BL_SwapBuffers();
00019
00020 void BL_warp_pointer(int x,int y);
00021
00022
00023 void BL_InitSectorVisibility();
00024 void BL_ExitSectorVisibility(int restore);
00025
00026 void BL_RenderDebugInfo();
00027
00028
00029 void BL_BeginFrame();
00030 void BL_EndFrame();
00031 void BL_RenderScene();
00032
00033 void BL_setviewmatrixview3d();
00034 float* BL_GetViewMatrix(struct Global* glob);
00035 float BL_GetViewDistance(struct Global* glob);
00036
00037 struct Object* BL_GetCameraObject(struct Global* glob);
00038 const BL_Mat4x4* BL_GetProjectionMatrix(struct ScrArea* area) ;
00039
00040
00041
00042 void BL_DisplayCamera();
00043 void BL_DoDebugColors(struct Object* ob);
00044 void BL_DisplaySymbolicShapes(struct Object* ob,int dt);
00045 void BL_DisplayBoundingBox(struct Object* ob);
00046 void BL_DrawShadow(struct Object* blenderobject,int drawingmode,bool wireframe);
00047 void BL_DisplaySolid(struct Object* blenderobject,int drawingmode);
00048 int BL_set_gl_light(int layer,float* viewmat,int dummy);
00049
00050 int BL_GetDrawType(struct Global* glob);
00051
00052 bool BL_ExternalCameraPerspective();
00053
00057 struct BL_BlenderWorldInfo
00058 {
00059 bool hasworld;
00060 float backcolor_red;
00061 float backcolor_green;
00062 float backcolor_blue;
00063
00064 bool hasmist;
00065
00066 float backcolor_miststart;
00067 float backcolor_mistdistance;
00068 float backcolor_mistcolor_red;
00069 float backcolor_mistcolor_green;
00070 float backcolor_mistcolor_blue;
00071
00072 float gravity;
00073 };
00074
00075 int BL_GetWindowHeight();
00076 int BL_GetWindowWidth();
00077 int BL_GetWindowMinX();
00078 int BL_GetWindowMinY();
00079
00080 BL_BlenderWorldInfo BL_GetBlenderWorldInfo(struct Global* glob);
00081
00082 void BL_RenderText(int mode,const char* textstr,int textlen,struct TFace* tface,
00083 float v1[3],float v2[3],float v3[3],float v4[3]);
00084
00085 void BL_print_gamedebug_line(char* text,int xco,int yco);
00086
00087
00088
00089 void BL_BuildSectorList();
00090
00091 int BL_getlayer(struct Object* ob);
00092
00093
00094 #ifdef __cplusplus
00095 }
00096 #endif //__cplusplus
00097
00098
00099 #endif //__BLENDERGL
00100