#include <openb3d.mod/b3dglsdlgraphics.mod/.bmx/b3dglsdlgraphics.bmx.release.win32.x86.h>
struct BBString_7{BBClass_String* clas;BBULONG hash;int length;BBChar buf[7];};
struct BBString_9{BBClass_String* clas;BBULONG hash;int length;BBChar buf[9];};
struct BBString_8{BBClass_String* clas;BBULONG hash;int length;BBChar buf[8];};
struct BBString_1{BBClass_String* clas;BBULONG hash;int length;BBChar buf[1];};
struct BBString_23{BBClass_String* clas;BBULONG hash;int length;BBChar buf[23];};
struct BBString_15{BBClass_String* clas;BBULONG hash;int length;BBChar buf[15];};
struct BBString_13{BBClass_String* clas;BBULONG hash;int length;BBChar buf[13];};
struct BBString_14{BBClass_String* clas;BBULONG hash;int length;BBChar buf[14];};
struct BBString_6{BBClass_String* clas;BBULONG hash;int length;BBChar buf[6];};
struct BBString_28{BBClass_String* clas;BBULONG hash;int length;BBChar buf[28];};
struct BBString_10{BBClass_String* clas;BBULONG hash;int length;BBChar buf[10];};
struct BBString_21{BBClass_String* clas;BBULONG hash;int length;BBChar buf[21];};
struct BBString_4{BBClass_String* clas;BBULONG hash;int length;BBChar buf[4];};
struct BBString_5{BBClass_String* clas;BBULONG hash;int length;BBChar buf[5];};
struct BBString_11{BBClass_String* clas;BBULONG hash;int length;BBChar buf[11];};
struct BBString_12{BBClass_String* clas;BBULONG hash;int length;BBChar buf[12];};
struct BBString_3{BBClass_String* clas;BBULONG hash;int length;BBChar buf[3];};
static struct BBString_7 _s32={
	&bbStringClass,
	0x421218e40b7972b2,
	7,
	{32,66,114,117,115,104,58}
};
static struct BBString_9 _s10={
	&bbStringClass,
	0x64ee46459dfa8fc9,
	9,
	{46,32,67,108,97,115,115,58,32}
};
static struct BBString_8 _s9={
	&bbStringClass,
	0xcefedd1efa595a35,
	8,
	{46,32,78,97,109,101,58,32}
};
static struct BBString_1 _s8={
	&bbStringClass,
	0x93db4e2578382cd,
	1,
	{47}
};
static struct BBString_23 _s13={
	&bbStringClass,
	0x70201055846531b6,
	23,
	{49,46,32,69,110,116,105,116,121,32,80,111,115,105,116,105,111
	,110,32,73,110,102,111}
};
static struct BBString_15 _s22={
	&bbStringClass,
	0x57b09f6c2ff5f2f,
	15,
	{50,46,32,83,117,114,102,97,99,101,32,73,110,102,111}
};
static struct BBString_13 _s31={
	&bbStringClass,
	0x43f0afe0b4e22166,
	13,
	{51,46,32,66,114,117,115,104,32,73,110,102,111}
};
static struct BBString_14 _s54={
	&bbStringClass,
	0x9fb3e2e8e7758676,
	14,
	{51,46,32,67,97,109,101,114,97,32,73,110,102,111}
};
static struct BBString_15 _s26={
	&bbStringClass,
	0xd0dc4aa7a44f5d32,
	15,
	{65,108,112,104,97,32,69,110,97,98,108,101,100,58,32}
};
static struct BBString_7 _s37={
	&bbStringClass,
	0xf4c459f0a7c6b07c,
	7,
	{65,108,112,104,97,58,32}
};
static struct BBString_7 _s38={
	&bbStringClass,
	0x4aa48a385fba158d,
	7,
	{66,108,101,110,100,58,32}
};
static struct BBString_6 _s36={
	&bbStringClass,
	0x5151ddf1271840e6,
	6,
	{66,108,117,101,58,32}
};
static struct BBString_7 _s6={
	&bbStringClass,
	0x1d7e41a0e4b37356,
	7,
	{66,111,110,101,115,58,32}
};
static struct BBString_28 _s56={
	&bbStringClass,
	0xbc2f673dcc094750,
	28,
	{67,97,109,101,114,97,32,101,110,116,105,116,121,32,110,111,116
	,32,115,112,101,99,105,102,105,101,100,33}
};
static struct BBString_9 _s1={
	&bbStringClass,
	0xf17e02289ca816da,
	9,
	{67,97,109,101,114,97,115,58,32}
};
static struct BBString_10 _s0={
	&bbStringClass,
	0xcf11d357eb93d14e,
	10,
	{69,110,116,105,116,105,101,115,58,32}
};
static struct BBString_13 _s53={
	&bbStringClass,
	0xbfcf523694bb2a8a,
	13,
	{69,110,116,105,116,121,32,66,114,117,115,104,58}
};
static struct BBString_21 _s30={
	&bbStringClass,
	0x12e82812df94ff45,
	21,
	{69,110,116,105,116,121,32,105,115,32,110,111,116,32,97,32,109
	,101,115,104,33}
};
static struct BBString_8 _s7={
	&bbStringClass,
	0x169688002c1a0dd4,
	8,
	{69,110,116,105,116,121,58,32}
};
static struct BBString_14 _s55={
	&bbStringClass,
	0x63427e533f9cb9d2,
	14,
	{69,110,116,105,116,121,73,110,86,105,101,119,58,32}
};
static struct BBString_4 _s39={
	&bbStringClass,
	0xcce40449cfcce686,
	4,
	{70,88,58,32}
};
static struct BBString_7 _s14={
	&bbStringClass,
	0x9e1019fc10e4ca2,
	7,
	{71,108,111,98,97,108,58}
};
static struct BBString_7 _s35={
	&bbStringClass,
	0x1c2676ff25c4e4a9,
	7,
	{71,114,101,101,110,58,32}
};
static struct BBString_8 _s2={
	&bbStringClass,
	0xbdbfdedc318fbbae,
	8,
	{76,105,103,104,116,115,58,32}
};
static struct BBString_6 _s21={
	&bbStringClass,
	0x82f91699e1e509f0,
	6,
	{76,111,99,97,108,58}
};
static struct BBString_8 _s4={
	&bbStringClass,
	0x5400a2d3541e8c8f,
	8,
	{77,101,115,104,101,115,58,32}
};
static struct BBString_6 _s33={
	&bbStringClass,
	0x22315ab6f3e05c9c,
	6,
	{78,97,109,101,58,32}
};
static struct BBString_8 _s52={
	&bbStringClass,
	0x35b583f4e22373d1,
	8,
	{78,111,32,98,114,117,115,104}
};
static struct BBString_10 _s29={
	&bbStringClass,
	0x3c4f87bc493144de,
	10,
	{78,111,32,115,117,114,102,97,99,101}
};
static struct BBString_1 _s12={
	&bbStringClass,
	0xe8b1a19dc18ffe04,
	1,
	{79}
};
static struct BBString_7 _s18={
	&bbStringClass,
	0x3fc0cb479990751b,
	7,
	{80,105,116,99,104,58,32}
};
static struct BBString_8 _s3={
	&bbStringClass,
	0x33dbc2432275729f,
	8,
	{80,105,118,111,116,115,58,32}
};
static struct BBString_5 _s34={
	&bbStringClass,
	0x59c505022e4a2e39,
	5,
	{82,101,100,58,32}
};
static struct BBString_6 _s20={
	&bbStringClass,
	0xb758c73c4467e6b,
	6,
	{82,111,108,108,58,32}
};
static struct BBString_9 _s5={
	&bbStringClass,
	0x7c3ec99d7181eee8,
	9,
	{83,112,114,105,116,101,115,58,32}
};
static struct BBString_11 _s28={
	&bbStringClass,
	0x4f488cbb80f7c105,
	11,
	{83,117,114,102,32,86,109,97,120,58,32}
};
static struct BBString_11 _s27={
	&bbStringClass,
	0x1c706058499d23b9,
	11,
	{83,117,114,102,32,86,109,105,110,58,32}
};
static struct BBString_8 _s23={
	&bbStringClass,
	0x18e12bae00c33453,
	8,
	{83,117,114,102,97,99,101,32}
};
static struct BBString_12 _s42={
	&bbStringClass,
	0xd4fc706860cb4bc1,
	12,
	{84,101,120,48,32,66,108,101,110,100,58,32}
};
static struct BBString_12 _s41={
	&bbStringClass,
	0xa32a81089ca6f78c,
	12,
	{84,101,120,48,32,70,108,97,103,115,58,32}
};
static struct BBString_11 _s40={
	&bbStringClass,
	0x141cda1d8743bb7c,
	11,
	{84,101,120,48,32,78,97,109,101,58,32}
};
static struct BBString_12 _s45={
	&bbStringClass,
	0x2dd967d2c4b2776f,
	12,
	{84,101,120,49,32,66,108,101,110,100,58,32}
};
static struct BBString_12 _s44={
	&bbStringClass,
	0x9127f46de56f86cb,
	12,
	{84,101,120,49,32,70,108,97,103,115,58,32}
};
static struct BBString_11 _s43={
	&bbStringClass,
	0x135fd927c09d604e,
	11,
	{84,101,120,49,32,78,97,109,101,58,32}
};
static struct BBString_12 _s48={
	&bbStringClass,
	0x4c7ca188f1f24ee4,
	12,
	{84,101,120,50,32,66,108,101,110,100,58,32}
};
static struct BBString_12 _s47={
	&bbStringClass,
	0xdce73c92c1035a6b,
	12,
	{84,101,120,50,32,70,108,97,103,115,58,32}
};
static struct BBString_11 _s46={
	&bbStringClass,
	0x3c4c1ff43bb24529,
	11,
	{84,101,120,50,32,78,97,109,101,58,32}
};
static struct BBString_12 _s51={
	&bbStringClass,
	0xb1748b690d4275a1,
	12,
	{84,101,120,51,32,66,108,101,110,100,58,32}
};
static struct BBString_12 _s50={
	&bbStringClass,
	0x8160b4bd0167d7a8,
	12,
	{84,101,120,51,32,70,108,97,103,115,58,32}
};
static struct BBString_11 _s49={
	&bbStringClass,
	0xbbc05199e79dd898,
	11,
	{84,101,120,51,32,78,97,109,101,58,32}
};
static struct BBString_11 _s25={
	&bbStringClass,
	0xac8132b65cab9a7f,
	11,
	{84,114,105,97,110,103,108,101,115,58,32}
};
static struct BBString_10 _s24={
	&bbStringClass,
	0x822fbd382e7f9876,
	10,
	{86,101,114,116,105,99,101,115,58,32}
};
static struct BBString_1 _s11={
	&bbStringClass,
	0x2287aeeecb0da086,
	1,
	{88}
};
static struct BBString_3 _s15={
	&bbStringClass,
	0x3124896fa0eb6db2,
	3,
	{88,58,32}
};
static struct BBString_3 _s16={
	&bbStringClass,
	0x18600cdb5fbe0242,
	3,
	{89,58,32}
};
static struct BBString_5 _s19={
	&bbStringClass,
	0xc9931a82f6eacb60,
	5,
	{89,97,119,58,32}
};
static struct BBString_3 _s17={
	&bbStringClass,
	0x8c20dfb654047aee,
	3,
	{90,58,32}
};
struct BBDebugScope_18{int kind; const char *name; BBDebugDecl decls[19]; };
void _openb3d_b3dglsdlgraphics_TDebug_New(struct openb3d_b3dglsdlgraphics_TDebug_obj* o) {
	bbObjectCtor((BBOBJECT)o);
	o->clas = &openb3d_b3dglsdlgraphics_TDebug;
}
void openb3d_b3dglsdlgraphics_TDebug_DebugWorld_v(){
	BBINT bbt_no_ents=0;
	BBINT bbt_no_cams=0;
	BBINT bbt_no_lights=0;
	BBINT bbt_no_pivs=0;
	BBINT bbt_no_meshes=0;
	BBINT bbt_no_sprites=0;
	BBINT bbt_no_bones=0;
	struct brl_linkedlist_TListEnum_obj* bbt_=(struct brl_linkedlist_TListEnum_obj*)(openb3d_openb3dcore_TEntity_entity_list)->clas->m_ObjectEnumerator((struct brl_linkedlist_TList_obj*)openb3d_openb3dcore_TEntity_entity_list);
	while((bbt_)->clas->m_HasNext((struct brl_linkedlist_TListEnum_obj*)bbt_)!=0){
		struct openb3d_openb3dcore_TEntity_obj* bbt_ent=(struct openb3d_openb3dcore_TEntity_obj*)((struct openb3d_openb3dcore_TEntity_obj*)bbObjectDowncast((BBOBJECT)(bbt_)->clas->m_NextObject((struct brl_linkedlist_TListEnum_obj*)bbt_),(BBClass*)&openb3d_openb3dcore_TEntity));
		if(((BBOBJECT)bbt_ent)==&bbNullObject){
			continue;
		}
		bbt_no_ents+=1;
		if(((BBOBJECT)((struct openb3d_openb3dcore_TCamera_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TCamera)))!=&bbNullObject){
			bbt_no_cams+=1;
		}
		if(((BBOBJECT)((struct openb3d_openb3dcore_TLight_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TLight)))!=&bbNullObject){
			bbt_no_lights+=1;
		}
		if(((BBOBJECT)((struct openb3d_openb3dcore_TPivot_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TPivot)))!=&bbNullObject){
			bbt_no_pivs+=1;
		}
		if(((BBOBJECT)((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh)))!=&bbNullObject){
			bbt_no_meshes+=1;
		}
		if(((BBOBJECT)((struct openb3d_openb3dcore_TSprite_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TSprite)))!=&bbNullObject){
			bbt_no_sprites+=1;
		}
		if(((BBOBJECT)((struct openb3d_openb3dcore_TBone_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TBone)))!=&bbNullObject){
			bbt_no_bones+=1;
		}
	}
	openb3d_b3dglsdlgraphics_Text(0,120,bbStringConcat(((BBString*)&_s0),bbStringFromInt(bbt_no_ents)));
	openb3d_b3dglsdlgraphics_Text(0,140,bbStringConcat(((BBString*)&_s1),bbStringFromInt(bbt_no_cams)));
	openb3d_b3dglsdlgraphics_Text(0,160,bbStringConcat(((BBString*)&_s2),bbStringFromInt(bbt_no_lights)));
	openb3d_b3dglsdlgraphics_Text(0,180,bbStringConcat(((BBString*)&_s3),bbStringFromInt(bbt_no_pivs)));
	openb3d_b3dglsdlgraphics_Text(0,200,bbStringConcat(((BBString*)&_s4),bbStringFromInt(bbt_no_meshes)));
	openb3d_b3dglsdlgraphics_Text(0,220,bbStringConcat(((BBString*)&_s5),bbStringFromInt(bbt_no_sprites)));
	openb3d_b3dglsdlgraphics_Text(0,240,bbStringConcat(((BBString*)&_s6),bbStringFromInt(bbt_no_bones)));
}
struct openb3d_openb3dcore_TEntity_obj* openb3d_b3dglsdlgraphics_TDebug_DebugEntity_TTEntity_TTEntityTTCamera(struct openb3d_openb3dcore_TEntity_obj* bbt_ent,struct openb3d_openb3dcore_TCamera_obj* bbt_cam){
	if(((BBOBJECT)bbt_ent)==&bbNullObject){
		return (struct openb3d_openb3dcore_TEntity_obj*)&bbNullObject;
	}
	BBINT bbt_no_children=0;
	struct openb3d_openb3dcore_TEntity_obj* bbt_old_cent=(struct openb3d_openb3dcore_TEntity_obj*)(bbt_ent)->clas->m_GetChildFromAll_iviTTEntity((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,openb3d_b3dglsdlgraphics_TDebug_cno,(&bbt_no_children),(struct openb3d_openb3dcore_TEntity_obj*)&bbNullObject);
	if(((BBOBJECT)bbt_old_cent)!=&bbNullObject){
		(bbt_old_cent)->clas->m_EntityColor_fffi((struct openb3d_openb3dcore_TEntity_obj*)bbt_old_cent,255.000000f,255.000000f,255.000000f,1);
	}
	if(brl_polledinput_KeyHit(107)!=0){
		openb3d_b3dglsdlgraphics_TDebug_cno=(openb3d_b3dglsdlgraphics_TDebug_cno+1);
	}
	if(brl_polledinput_KeyHit(109)!=0){
		openb3d_b3dglsdlgraphics_TDebug_cno=(openb3d_b3dglsdlgraphics_TDebug_cno-1);
	}
	BBINT bbt_no_childs=openb3d_openb3dcore_TEntity_CountAllChildren_i_TTEntityi((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,0);
	if(openb3d_b3dglsdlgraphics_TDebug_cno<0){
		openb3d_b3dglsdlgraphics_TDebug_cno=0;
	}
	if(openb3d_b3dglsdlgraphics_TDebug_cno>bbt_no_childs){
		openb3d_b3dglsdlgraphics_TDebug_cno=bbt_no_childs;
	}
	bbt_no_children=0;
	struct openb3d_openb3dcore_TEntity_obj* bbt_cent=(struct openb3d_openb3dcore_TEntity_obj*)(bbt_ent)->clas->m_GetChildFromAll_iviTTEntity((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,openb3d_b3dglsdlgraphics_TDebug_cno,(&bbt_no_children),(struct openb3d_openb3dcore_TEntity_obj*)&bbNullObject);
	if(((BBOBJECT)bbt_cent)==&bbNullObject){
		bbt_cent=(struct openb3d_openb3dcore_TEntity_obj*)bbt_ent;
	}
	if(((BBOBJECT)bbt_cent)!=&bbNullObject){
		struct openb3d_openb3dcore_TSurface_obj* bbt_surf=(struct openb3d_openb3dcore_TSurface_obj*)((struct openb3d_openb3dcore_TSurface_obj*)&bbNullObject);
		if(((BBOBJECT)((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_cent,(BBClass*)&openb3d_openb3dcore_TMesh)))!=&bbNullObject){
			if(brl_polledinput_KeyHit(111)!=0){
				openb3d_b3dglsdlgraphics_TDebug_surf_no-=1;
			}
			if(brl_polledinput_KeyHit(106)!=0){
				openb3d_b3dglsdlgraphics_TDebug_surf_no+=1;
			}
			if(openb3d_b3dglsdlgraphics_TDebug_surf_no<1){
				openb3d_b3dglsdlgraphics_TDebug_surf_no=1;
			}
			struct openb3d_openb3dcore_TMesh_obj* bbt_;
			if(openb3d_b3dglsdlgraphics_TDebug_surf_no>(((struct openb3d_openb3dcore_TMesh_obj*)(bbt_ = ((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_cent,(BBClass*)&openb3d_openb3dcore_TMesh))))->clas)->m_CountSurfaces((struct openb3d_openb3dcore_TMesh_obj*)bbt_)){
				struct openb3d_openb3dcore_TMesh_obj* bbt_2;
				openb3d_b3dglsdlgraphics_TDebug_surf_no=(((struct openb3d_openb3dcore_TMesh_obj*)(bbt_2 = ((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_cent,(BBClass*)&openb3d_openb3dcore_TMesh))))->clas)->m_CountSurfaces((struct openb3d_openb3dcore_TMesh_obj*)bbt_2);
			}
			bbt_surf=(struct openb3d_openb3dcore_TSurface_obj*)openb3d_openb3dcore_GetSurface((struct openb3d_openb3dcore_TMesh_obj*)((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_cent,(BBClass*)&openb3d_openb3dcore_TMesh)),openb3d_b3dglsdlgraphics_TDebug_surf_no);
		}else{
			openb3d_b3dglsdlgraphics_TDebug_surf_no=0;
			bbt_surf=(struct openb3d_openb3dcore_TSurface_obj*)&bbNullObject;
		}
		if(brl_polledinput_KeyHit(96)!=0){
			openb3d_b3dglsdlgraphics_TDebug_show_ents=(1-openb3d_b3dglsdlgraphics_TDebug_show_ents);
		}
		openb3d_b3dglsdlgraphics_TDebug_UpdateBoundingSphere_v_TTEntity((struct openb3d_openb3dcore_TEntity_obj*)bbt_cent);
		openb3d_b3dglsdlgraphics_TDebug_UpdateSurface_v_TTEntityTTSurface((struct openb3d_openb3dcore_TEntity_obj*)bbt_cent,(struct openb3d_openb3dcore_TSurface_obj*)bbt_surf);
		openb3d_b3dglsdlgraphics_TDebug_UpdateMarker_v_TTEntityTTCamera((struct openb3d_openb3dcore_TEntity_obj*)bbt_cent,(struct openb3d_openb3dcore_TCamera_obj*)bbt_cam);
		if(brl_polledinput_KeyHit(97)!=0){
			openb3d_b3dglsdlgraphics_TDebug_info=1;
		}
		if(brl_polledinput_KeyHit(98)!=0){
			openb3d_b3dglsdlgraphics_TDebug_info=2;
		}
		if(brl_polledinput_KeyHit(99)!=0){
			openb3d_b3dglsdlgraphics_TDebug_info=3;
		}
		if(brl_polledinput_KeyHit(100)!=0){
			openb3d_b3dglsdlgraphics_TDebug_info=4;
		}
		if(brl_polledinput_KeyHit(101)!=0){
			openb3d_b3dglsdlgraphics_TDebug_info=5;
		}
		openb3d_b3dglsdlgraphics_Text(0,0,bbStringConcat(bbStringConcat(bbStringConcat(bbStringConcat(bbStringConcat(bbStringConcat(bbStringConcat(((BBString*)&_s7),bbStringFromInt(openb3d_b3dglsdlgraphics_TDebug_cno)),((BBString*)&_s8)),bbStringFromInt(bbt_no_childs)),((BBString*)&_s9)),(bbt_cent)->clas->m_EntityName((struct openb3d_openb3dcore_TEntity_obj*)bbt_cent)),((BBString*)&_s10)),(bbt_cent)->clas->m_EntityClass((struct openb3d_openb3dcore_TEntity_obj*)bbt_cent)));
		if(openb3d_b3dglsdlgraphics_TDebug_info==1){
			openb3d_b3dglsdlgraphics_TDebug_EntityInfo1_v_TTEntity((struct openb3d_openb3dcore_TEntity_obj*)bbt_cent);
		}
		if(openb3d_b3dglsdlgraphics_TDebug_info==2){
			openb3d_b3dglsdlgraphics_TDebug_EntityInfo2_v_TTEntityTTSurface((struct openb3d_openb3dcore_TEntity_obj*)bbt_cent,(struct openb3d_openb3dcore_TSurface_obj*)bbt_surf);
		}
		if(openb3d_b3dglsdlgraphics_TDebug_info==3){
			openb3d_b3dglsdlgraphics_TDebug_EntityInfo3_v_TTEntityTTSurface((struct openb3d_openb3dcore_TEntity_obj*)bbt_cent,(struct openb3d_openb3dcore_TSurface_obj*)bbt_surf);
		}
		if(openb3d_b3dglsdlgraphics_TDebug_info==4){
			openb3d_b3dglsdlgraphics_TDebug_EntityInfo4_v_TTEntityTTCamera((struct openb3d_openb3dcore_TEntity_obj*)bbt_cent,(struct openb3d_openb3dcore_TCamera_obj*)bbt_cam);
		}
		if(openb3d_b3dglsdlgraphics_TDebug_info==5){
			openb3d_b3dglsdlgraphics_TDebug_EntityInfo4_v_TTEntityTTCamera((struct openb3d_openb3dcore_TEntity_obj*)bbt_cent,(struct openb3d_openb3dcore_TCamera_obj*)bbt_cam);
		}
	}
	return (struct openb3d_openb3dcore_TEntity_obj*)bbt_cent;
}
void openb3d_b3dglsdlgraphics_TDebug_UpdateBoundingSphere_v_TTEntity(struct openb3d_openb3dcore_TEntity_obj* bbt_ent){
	if(((BBOBJECT)openb3d_b3dglsdlgraphics_TDebug_bounding_sphere)==&bbNullObject){
		openb3d_b3dglsdlgraphics_TDebug_bounding_sphere=(struct openb3d_openb3dcore_TMesh_obj*)openb3d_openb3dcore_TMesh_CreateSphere_TTMesh_iTTEntity(16,(struct openb3d_openb3dcore_TEntity_obj*)&bbNullObject);
		(openb3d_b3dglsdlgraphics_TDebug_bounding_sphere)->clas->m_EntityAlpha_f((struct openb3d_openb3dcore_TEntity_obj*)openb3d_b3dglsdlgraphics_TDebug_bounding_sphere,0.25f);
		(openb3d_b3dglsdlgraphics_TDebug_bounding_sphere)->clas->m_EntityColor_fffi((struct openb3d_openb3dcore_TEntity_obj*)openb3d_b3dglsdlgraphics_TDebug_bounding_sphere,255.000000f,0.00000000f,0.00000000f,1);
	}
	if((openb3d_b3dglsdlgraphics_TDebug_show_ents==0) || (((BBOBJECT)((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh)))==&bbNullObject)){
		(openb3d_b3dglsdlgraphics_TDebug_bounding_sphere)->clas->m_HideEntity((struct openb3d_openb3dcore_TEntity_obj*)openb3d_b3dglsdlgraphics_TDebug_bounding_sphere);
		return;
	}
	(openb3d_b3dglsdlgraphics_TDebug_bounding_sphere)->clas->m_ShowEntity((struct openb3d_openb3dcore_TEntity_obj*)openb3d_b3dglsdlgraphics_TDebug_bounding_sphere);
	BBFLOAT bbt_radius=brl_blitz_Abs2(bbt_ent->_openb3d_openb3dcore_tentity_cull_radius [0]);
	BBFLOAT bbt_x=((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_min_x [0];
	BBFLOAT bbt_y=((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_min_y [0];
	BBFLOAT bbt_z=((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_min_z [0];
	bbt_x=(bbt_x+((((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_max_x [0]-((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_min_x [0])/2.0f));
	bbt_y=(bbt_y+((((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_max_y [0]-((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_min_y [0])/2.0f));
	bbt_z=(bbt_z+((((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_max_z [0]-((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_min_z [0])/2.0f));
	openb3d_openb3dcore_TEntity_TFormPoint_i_fffTTEntityTTEntity(bbt_x,bbt_y,bbt_z,(struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,(struct openb3d_openb3dcore_TEntity_obj*)&bbNullObject);
	bbt_x=openb3d_openb3dcore_TEntity_TFormedX_f();
	bbt_y=openb3d_openb3dcore_TEntity_TFormedY_f();
	bbt_z=openb3d_openb3dcore_TEntity_TFormedZ_f();
	BBFLOAT bbt_rx=(bbt_radius*(bbt_ent)->clas->m_EntityScaleX_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,1));
	BBFLOAT bbt_ry=(bbt_radius*(bbt_ent)->clas->m_EntityScaleY_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,1));
	BBFLOAT bbt_rz=(bbt_radius*(bbt_ent)->clas->m_EntityScaleZ_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,1));
	if((bbt_rx>=bbt_ry) && (bbt_rx>=bbt_rz)){
		bbt_radius=brl_blitz_Abs2(bbt_rx);
	}else{
		if((bbt_ry>=bbt_rx) && (bbt_ry>=bbt_rz)){
			bbt_radius=brl_blitz_Abs2(bbt_ry);
		}else{
			bbt_radius=brl_blitz_Abs2(bbt_rz);
		}
	}
	(openb3d_b3dglsdlgraphics_TDebug_bounding_sphere)->clas->m_PositionEntity_fffi((struct openb3d_openb3dcore_TEntity_obj*)openb3d_b3dglsdlgraphics_TDebug_bounding_sphere,bbt_x,bbt_y,bbt_z,1);
	(openb3d_b3dglsdlgraphics_TDebug_bounding_sphere)->clas->m_ScaleEntity_fffi((struct openb3d_openb3dcore_TEntity_obj*)openb3d_b3dglsdlgraphics_TDebug_bounding_sphere,bbt_radius,bbt_radius,bbt_radius,0);
}
void openb3d_b3dglsdlgraphics_TDebug_UpdateSurface_v_TTEntityTTSurface(struct openb3d_openb3dcore_TEntity_obj* bbt_ent,struct openb3d_openb3dcore_TSurface_obj* bbt_surf){
	if(((BBOBJECT)openb3d_b3dglsdlgraphics_TDebug_debug_mesh)==&bbNullObject){
		openb3d_b3dglsdlgraphics_TDebug_debug_mesh=(struct openb3d_openb3dcore_TMesh_obj*)openb3d_openb3dcore_TMesh_CreateMesh_TTMesh_TTEntity((struct openb3d_openb3dcore_TEntity_obj*)&bbNullObject);
		openb3d_b3dglsdlgraphics_TDebug_debug_surf=(struct openb3d_openb3dcore_TSurface_obj*)(openb3d_b3dglsdlgraphics_TDebug_debug_mesh)->clas->m_CreateSurface_TTBrush((struct openb3d_openb3dcore_TMesh_obj*)openb3d_b3dglsdlgraphics_TDebug_debug_mesh,(struct openb3d_openb3dcore_TBrush_obj*)&bbNullObject);
		(openb3d_b3dglsdlgraphics_TDebug_debug_mesh)->clas->m_EntityColor_fffi((struct openb3d_openb3dcore_TEntity_obj*)openb3d_b3dglsdlgraphics_TDebug_debug_mesh,255.000000f,0.00000000f,0.00000000f,1);
		(openb3d_b3dglsdlgraphics_TDebug_debug_mesh)->clas->m_EntityAlpha_f((struct openb3d_openb3dcore_TEntity_obj*)openb3d_b3dglsdlgraphics_TDebug_debug_mesh,0.5f);
		(openb3d_b3dglsdlgraphics_TDebug_debug_mesh)->clas->m_EntityOrder_i((struct openb3d_openb3dcore_TEntity_obj*)openb3d_b3dglsdlgraphics_TDebug_debug_mesh,-99);
	}else{
		(openb3d_b3dglsdlgraphics_TDebug_debug_surf)->clas->m_ClearSurface_ii((struct openb3d_openb3dcore_TSurface_obj*)openb3d_b3dglsdlgraphics_TDebug_debug_surf,1,1);
	}
	if((openb3d_b3dglsdlgraphics_TDebug_show_ents==0) || (((BBOBJECT)bbt_surf)==&bbNullObject)){
		(openb3d_b3dglsdlgraphics_TDebug_debug_mesh)->clas->m_HideEntity((struct openb3d_openb3dcore_TEntity_obj*)openb3d_b3dglsdlgraphics_TDebug_debug_mesh);
		return;
	}
	(openb3d_b3dglsdlgraphics_TDebug_debug_mesh)->clas->m_ShowEntity((struct openb3d_openb3dcore_TEntity_obj*)openb3d_b3dglsdlgraphics_TDebug_debug_mesh);
	{
		BBINT bbt_tri=0;
		BBINT bbt_=(bbt_surf)->clas->m_CountTriangles((struct openb3d_openb3dcore_TSurface_obj*)bbt_surf);
		for(;(bbt_tri<bbt_);bbt_tri=(bbt_tri+1)){
			BBARRAY bbt_v=bbArrayNew1D("i", 3);
			((BBINT*)BBARRAYDATA(bbt_v,1))[0U]=(bbt_surf)->clas->m_TriangleVertex_ii((struct openb3d_openb3dcore_TSurface_obj*)bbt_surf,bbt_tri,0);
			((BBINT*)BBARRAYDATA(bbt_v,1))[1U]=(bbt_surf)->clas->m_TriangleVertex_ii((struct openb3d_openb3dcore_TSurface_obj*)bbt_surf,bbt_tri,1);
			((BBINT*)BBARRAYDATA(bbt_v,1))[2U]=(bbt_surf)->clas->m_TriangleVertex_ii((struct openb3d_openb3dcore_TSurface_obj*)bbt_surf,bbt_tri,2);
			BBARRAY bbt_nv=bbArrayNew1D("i", 3);
			{
				BBINT bbt_i=0;
				for(;(bbt_i<=2);bbt_i=(bbt_i+1)){
					BBFLOAT bbt_vx=(bbt_surf)->clas->m_VertexX_i((struct openb3d_openb3dcore_TSurface_obj*)bbt_surf,((BBINT*)BBARRAYDATA(bbt_v,1))[((BBUINT)bbt_i)]);
					BBFLOAT bbt_vy=(bbt_surf)->clas->m_VertexY_i((struct openb3d_openb3dcore_TSurface_obj*)bbt_surf,((BBINT*)BBARRAYDATA(bbt_v,1))[((BBUINT)bbt_i)]);
					BBFLOAT bbt_vz=(bbt_surf)->clas->m_VertexZ_i((struct openb3d_openb3dcore_TSurface_obj*)bbt_surf,((BBINT*)BBARRAYDATA(bbt_v,1))[((BBUINT)bbt_i)]);
					openb3d_openb3dcore_TEntity_TFormPoint_i_fffTTEntityTTEntity(bbt_vx,bbt_vy,bbt_vz,(struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,(struct openb3d_openb3dcore_TEntity_obj*)&bbNullObject);
					bbt_vx=openb3d_openb3dcore_TEntity_TFormedX_f();
					bbt_vy=openb3d_openb3dcore_TEntity_TFormedY_f();
					bbt_vz=openb3d_openb3dcore_TEntity_TFormedZ_f();
					((BBINT*)BBARRAYDATA(bbt_nv,1))[((BBUINT)bbt_i)]=(openb3d_b3dglsdlgraphics_TDebug_debug_surf)->clas->m_AddVertex_ffffff((struct openb3d_openb3dcore_TSurface_obj*)openb3d_b3dglsdlgraphics_TDebug_debug_surf,bbt_vx,bbt_vy,bbt_vz,0.00000000f,0.00000000f,0.00000000f);
				}
			}
			(openb3d_b3dglsdlgraphics_TDebug_debug_surf)->clas->m_AddTriangle_iii((struct openb3d_openb3dcore_TSurface_obj*)openb3d_b3dglsdlgraphics_TDebug_debug_surf,((BBINT*)BBARRAYDATA(bbt_nv,1))[0U],((BBINT*)BBARRAYDATA(bbt_nv,1))[1U],((BBINT*)BBARRAYDATA(bbt_nv,1))[2U]);
		}
	}
	(openb3d_b3dglsdlgraphics_TDebug_debug_mesh)->clas->m_PositionMesh_fff((struct openb3d_openb3dcore_TMesh_obj*)openb3d_b3dglsdlgraphics_TDebug_debug_mesh,0.00000000f,0.00000000f,0.00000000f);
}
void openb3d_b3dglsdlgraphics_TDebug_UpdateMarker_v_TTEntityTTCamera(struct openb3d_openb3dcore_TEntity_obj* bbt_ent,struct openb3d_openb3dcore_TCamera_obj* bbt_cam){
	if(((BBOBJECT)bbt_cam)==&bbNullObject){
		return;
	}
	BBFLOAT bbt_x=((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_min_x [0];
	BBFLOAT bbt_y=((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_min_y [0];
	BBFLOAT bbt_z=((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_min_z [0];
	bbt_x=(bbt_x+((((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_max_x [0]-((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_min_x [0])/2.0f));
	bbt_y=(bbt_y+((((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_max_y [0]-((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_min_y [0])/2.0f));
	bbt_z=(bbt_z+((((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_max_z [0]-((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))->_openb3d_openb3dcore_tmesh_min_z [0])/2.0f));
	openb3d_openb3dcore_TEntity_TFormPoint_i_fffTTEntityTTEntity(bbt_x,bbt_y,bbt_z,(struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,(struct openb3d_openb3dcore_TEntity_obj*)&bbNullObject);
	bbt_x=openb3d_openb3dcore_TEntity_TFormedX_f();
	bbt_y=openb3d_openb3dcore_TEntity_TFormedY_f();
	bbt_z=openb3d_openb3dcore_TEntity_TFormedZ_f();
	(bbt_cam)->clas->m_CameraProject_fff((struct openb3d_openb3dcore_TCamera_obj*)bbt_cam,bbt_x,bbt_y,bbt_z);
	openb3d_b3dglsdlgraphics_Text(((BBINT)openb3d_openb3dcore_ProjectedX()),((BBINT)openb3d_openb3dcore_ProjectedY()),((BBString*)&_s11));
	openb3d_openb3dcore_TEntity_TFormPoint_i_fffTTEntityTTEntity((bbt_ent)->clas->m_EntityX_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,1),(bbt_ent)->clas->m_EntityY_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,1),(bbt_ent)->clas->m_EntityZ_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,1),(struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,(struct openb3d_openb3dcore_TEntity_obj*)&bbNullObject);
	bbt_x=openb3d_openb3dcore_TEntity_TFormedX_f();
	bbt_y=openb3d_openb3dcore_TEntity_TFormedY_f();
	bbt_z=openb3d_openb3dcore_TEntity_TFormedZ_f();
	(bbt_cam)->clas->m_CameraProject_fff((struct openb3d_openb3dcore_TCamera_obj*)bbt_cam,bbt_x,bbt_y,bbt_z);
	openb3d_b3dglsdlgraphics_Text(((BBINT)openb3d_openb3dcore_ProjectedX()),((BBINT)openb3d_openb3dcore_ProjectedY()),((BBString*)&_s12));
}
void openb3d_b3dglsdlgraphics_TDebug_EntityInfo1_v_TTEntity(struct openb3d_openb3dcore_TEntity_obj* bbt_ent){
	openb3d_b3dglsdlgraphics_Text(0,40,((BBString*)&_s13));
	openb3d_b3dglsdlgraphics_Text(0,80,((BBString*)&_s14));
	BBFLOAT bbt_xx=0.00000000f;
	bbt_xx=(bbt_ent)->clas->m_EntityX_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,1);
	if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
		bbt_xx=0.00000000f;
	}
	openb3d_b3dglsdlgraphics_Text(0,100,bbStringConcat(((BBString*)&_s15),bbStringFromFloat(bbt_xx)));
	bbt_xx=(bbt_ent)->clas->m_EntityY_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,1);
	if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
		bbt_xx=0.00000000f;
	}
	openb3d_b3dglsdlgraphics_Text(0,120,bbStringConcat(((BBString*)&_s16),bbStringFromFloat(bbt_xx)));
	bbt_xx=(bbt_ent)->clas->m_EntityZ_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,1);
	if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
		bbt_xx=0.00000000f;
	}
	openb3d_b3dglsdlgraphics_Text(0,140,bbStringConcat(((BBString*)&_s17),bbStringFromFloat(bbt_xx)));
	bbt_xx=(bbt_ent)->clas->m_EntityPitch_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,1);
	if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
		bbt_xx=0.00000000f;
	}
	openb3d_b3dglsdlgraphics_Text(0,160,bbStringConcat(((BBString*)&_s18),bbStringFromFloat(bbt_xx)));
	bbt_xx=(bbt_ent)->clas->m_EntityYaw_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,1);
	if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
		bbt_xx=0.00000000f;
	}
	openb3d_b3dglsdlgraphics_Text(0,180,bbStringConcat(((BBString*)&_s19),bbStringFromFloat(bbt_xx)));
	bbt_xx=(bbt_ent)->clas->m_EntityRoll_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,1);
	if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
		bbt_xx=0.00000000f;
	}
	openb3d_b3dglsdlgraphics_Text(0,200,bbStringConcat(((BBString*)&_s20),bbStringFromFloat(bbt_xx)));
	openb3d_b3dglsdlgraphics_Text(0,240,((BBString*)&_s21));
	bbt_xx=(bbt_ent)->clas->m_EntityX_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,0);
	if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
		bbt_xx=0.00000000f;
	}
	openb3d_b3dglsdlgraphics_Text(0,260,bbStringConcat(((BBString*)&_s15),bbStringFromFloat(bbt_xx)));
	bbt_xx=(bbt_ent)->clas->m_EntityY_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,0);
	if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
		bbt_xx=0.00000000f;
	}
	openb3d_b3dglsdlgraphics_Text(0,280,bbStringConcat(((BBString*)&_s16),bbStringFromFloat(bbt_xx)));
	bbt_xx=(bbt_ent)->clas->m_EntityZ_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,0);
	if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
		bbt_xx=0.00000000f;
	}
	openb3d_b3dglsdlgraphics_Text(0,300,bbStringConcat(((BBString*)&_s17),bbStringFromFloat(bbt_xx)));
	bbt_xx=(bbt_ent)->clas->m_EntityPitch_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,0);
	if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
		bbt_xx=0.00000000f;
	}
	openb3d_b3dglsdlgraphics_Text(0,320,bbStringConcat(((BBString*)&_s18),bbStringFromFloat(bbt_xx)));
	bbt_xx=(bbt_ent)->clas->m_EntityYaw_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,0);
	if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
		bbt_xx=0.00000000f;
	}
	openb3d_b3dglsdlgraphics_Text(0,340,bbStringConcat(((BBString*)&_s19),bbStringFromFloat(bbt_xx)));
	bbt_xx=(bbt_ent)->clas->m_EntityRoll_i((struct openb3d_openb3dcore_TEntity_obj*)bbt_ent,0);
	if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
		bbt_xx=0.00000000f;
	}
	openb3d_b3dglsdlgraphics_Text(0,360,bbStringConcat(((BBString*)&_s20),bbStringFromFloat(bbt_xx)));
	BBINT bbt_tx=0;
	BBINT bbt_ty=380;
	{
		BBINT bbt_iy=0;
		for(;(bbt_iy<=3);bbt_iy=(bbt_iy+1)){
			bbt_tx=0;
			bbt_ty=(bbt_ty+20);
			{
				BBINT bbt_ix=0;
				for(;(bbt_ix<=3);bbt_ix=(bbt_ix+1)){
					bbt_xx=bbt_ent->_openb3d_openb3dcore_tentity_mat ->_openb3d_openb3dcore_tmatptr_grid [((4*bbt_ix)+bbt_iy)];
					if((bbt_xx<0.0001f) && (bbt_xx>-0.0001f)){
						bbt_xx=0.00000000f;
					}
					openb3d_b3dglsdlgraphics_Text(bbt_tx,bbt_ty,bbStringFromFloat(bbt_xx));
					bbt_tx=(bbt_tx+100);
				}
			}
		}
	}
}
void openb3d_b3dglsdlgraphics_TDebug_EntityInfo2_v_TTEntityTTSurface(struct openb3d_openb3dcore_TEntity_obj* bbt_ent,struct openb3d_openb3dcore_TSurface_obj* bbt_surf){
	if(((BBOBJECT)((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh)))!=&bbNullObject){
		openb3d_b3dglsdlgraphics_Text(0,40,((BBString*)&_s22));
		if(((BBOBJECT)bbt_surf)!=&bbNullObject){
			struct openb3d_openb3dcore_TMesh_obj* bbt_;
			openb3d_b3dglsdlgraphics_Text(0,80,bbStringConcat(bbStringConcat(bbStringConcat(((BBString*)&_s23),bbStringFromInt(openb3d_b3dglsdlgraphics_TDebug_surf_no)),((BBString*)&_s8)),bbStringFromInt((((struct openb3d_openb3dcore_TMesh_obj*)(bbt_ = ((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))))->clas)->m_CountSurfaces((struct openb3d_openb3dcore_TMesh_obj*)bbt_))));
			struct openb3d_openb3dcore_TMesh_obj* bbt_2;
			openb3d_b3dglsdlgraphics_Text(0,100,bbStringConcat(bbStringConcat(bbStringConcat(((BBString*)&_s24),bbStringFromInt((bbt_surf)->clas->m_CountVertices((struct openb3d_openb3dcore_TSurface_obj*)bbt_surf))),((BBString*)&_s8)),bbStringFromInt((((struct openb3d_openb3dcore_TMesh_obj*)(bbt_2 = ((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))))->clas)->m_CountVertices((struct openb3d_openb3dcore_TMesh_obj*)bbt_2))));
			struct openb3d_openb3dcore_TMesh_obj* bbt_3;
			openb3d_b3dglsdlgraphics_Text(0,120,bbStringConcat(bbStringConcat(bbStringConcat(((BBString*)&_s25),bbStringFromInt((bbt_surf)->clas->m_CountTriangles((struct openb3d_openb3dcore_TSurface_obj*)bbt_surf))),((BBString*)&_s8)),bbStringFromInt((((struct openb3d_openb3dcore_TMesh_obj*)(bbt_3 = ((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))))->clas)->m_CountTriangles((struct openb3d_openb3dcore_TMesh_obj*)bbt_3))));
			openb3d_b3dglsdlgraphics_Text(0,160,bbStringConcat(((BBString*)&_s26),bbStringFromInt(bbt_surf->_openb3d_openb3dcore_tsurface_alpha_enable [0])));
			openb3d_b3dglsdlgraphics_Text(0,200,bbStringConcat(((BBString*)&_s27),bbStringFromInt(bbt_surf->_openb3d_openb3dcore_tsurface_vmin [0])));
			openb3d_b3dglsdlgraphics_Text(0,220,bbStringConcat(((BBString*)&_s28),bbStringFromInt(bbt_surf->_openb3d_openb3dcore_tsurface_vmax [0])));
		}else{
			openb3d_b3dglsdlgraphics_Text(0,80,((BBString*)&_s29));
		}
	}else{
		openb3d_b3dglsdlgraphics_Text(0,80,((BBString*)&_s30));
	}
}
void openb3d_b3dglsdlgraphics_TDebug_EntityInfo3_v_TTEntityTTSurface(struct openb3d_openb3dcore_TEntity_obj* bbt_ent,struct openb3d_openb3dcore_TSurface_obj* bbt_surf){
	openb3d_b3dglsdlgraphics_Text(0,40,((BBString*)&_s31));
	if(((BBOBJECT)bbt_surf)!=&bbNullObject){
		struct openb3d_openb3dcore_TMesh_obj* bbt_;
		openb3d_b3dglsdlgraphics_Text(0,80,bbStringConcat(bbStringConcat(bbStringConcat(bbStringConcat(((BBString*)&_s23),bbStringFromInt(openb3d_b3dglsdlgraphics_TDebug_surf_no)),((BBString*)&_s8)),bbStringFromInt((((struct openb3d_openb3dcore_TMesh_obj*)(bbt_ = ((struct openb3d_openb3dcore_TMesh_obj*)bbObjectDowncast((BBOBJECT)bbt_ent,(BBClass*)&openb3d_openb3dcore_TMesh))))->clas)->m_CountSurfaces((struct openb3d_openb3dcore_TMesh_obj*)bbt_))),((BBString*)&_s32)));
		if(((BBOBJECT)bbt_surf->_openb3d_openb3dcore_tsurface_brush )!=&bbNullObject){
			openb3d_b3dglsdlgraphics_Text(0,100,bbStringConcat(((BBString*)&_s33),bbStringFromCString(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_name )));
			openb3d_b3dglsdlgraphics_Text(0,120,bbStringConcat(((BBString*)&_s34),bbStringFromFloat(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_red [0])));
			openb3d_b3dglsdlgraphics_Text(0,140,bbStringConcat(((BBString*)&_s35),bbStringFromFloat(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_green [0])));
			openb3d_b3dglsdlgraphics_Text(0,160,bbStringConcat(((BBString*)&_s36),bbStringFromFloat(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_blue [0])));
			openb3d_b3dglsdlgraphics_Text(0,180,bbStringConcat(((BBString*)&_s37),bbStringFromFloat(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_alpha [0])));
			openb3d_b3dglsdlgraphics_Text(0,200,bbStringConcat(((BBString*)&_s38),bbStringFromInt(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_blend [0])));
			openb3d_b3dglsdlgraphics_Text(0,220,bbStringConcat(((BBString*)&_s39),bbStringFromInt(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_fx [0])));
			if(((BBOBJECT)((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[0U])!=&bbNullObject){
				openb3d_b3dglsdlgraphics_Text(0,240,bbStringConcat(((BBString*)&_s40),bbStringFromCString(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[0U]->_openb3d_openb3dcore_ttexture_file )));
				openb3d_b3dglsdlgraphics_Text(0,260,bbStringConcat(((BBString*)&_s41),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[0U]->_openb3d_openb3dcore_ttexture_flags [0])));
				openb3d_b3dglsdlgraphics_Text(0,280,bbStringConcat(((BBString*)&_s42),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[0U]->_openb3d_openb3dcore_ttexture_blend [0])));
			}
			if(((BBOBJECT)((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[1U])!=&bbNullObject){
				openb3d_b3dglsdlgraphics_Text(0,300,bbStringConcat(((BBString*)&_s43),bbStringFromCString(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[1U]->_openb3d_openb3dcore_ttexture_file )));
				openb3d_b3dglsdlgraphics_Text(0,320,bbStringConcat(((BBString*)&_s44),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[1U]->_openb3d_openb3dcore_ttexture_flags [0])));
				openb3d_b3dglsdlgraphics_Text(0,340,bbStringConcat(((BBString*)&_s45),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[1U]->_openb3d_openb3dcore_ttexture_blend [0])));
			}
			if(((BBOBJECT)((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[2U])!=&bbNullObject){
				openb3d_b3dglsdlgraphics_Text(0,360,bbStringConcat(((BBString*)&_s46),bbStringFromCString(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[2U]->_openb3d_openb3dcore_ttexture_file )));
				openb3d_b3dglsdlgraphics_Text(0,380,bbStringConcat(((BBString*)&_s47),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[2U]->_openb3d_openb3dcore_ttexture_flags [0])));
				openb3d_b3dglsdlgraphics_Text(0,400,bbStringConcat(((BBString*)&_s48),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[2U]->_openb3d_openb3dcore_ttexture_blend [0])));
			}
			if(((BBOBJECT)((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[3U])!=&bbNullObject){
				openb3d_b3dglsdlgraphics_Text(0,420,bbStringConcat(((BBString*)&_s49),bbStringFromCString(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[3U]->_openb3d_openb3dcore_ttexture_file )));
				openb3d_b3dglsdlgraphics_Text(0,440,bbStringConcat(((BBString*)&_s50),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[3U]->_openb3d_openb3dcore_ttexture_flags [0])));
				openb3d_b3dglsdlgraphics_Text(0,460,bbStringConcat(((BBString*)&_s51),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_surf->_openb3d_openb3dcore_tsurface_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[3U]->_openb3d_openb3dcore_ttexture_blend [0])));
			}
		}else{
			openb3d_b3dglsdlgraphics_Text(0,100,((BBString*)&_s52));
		}
	}else{
		openb3d_b3dglsdlgraphics_Text(0,100,((BBString*)&_s29));
	}
	openb3d_b3dglsdlgraphics_Text(200,80,((BBString*)&_s53));
	if(((BBOBJECT)bbt_ent->_openb3d_openb3dcore_tentity_brush )!=&bbNullObject){
		openb3d_b3dglsdlgraphics_Text(200,100,bbStringConcat(((BBString*)&_s33),bbStringFromCString(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_name )));
		openb3d_b3dglsdlgraphics_Text(200,120,bbStringConcat(((BBString*)&_s34),bbStringFromFloat(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_red [0])));
		openb3d_b3dglsdlgraphics_Text(200,140,bbStringConcat(((BBString*)&_s35),bbStringFromFloat(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_green [0])));
		openb3d_b3dglsdlgraphics_Text(200,160,bbStringConcat(((BBString*)&_s36),bbStringFromFloat(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_blue [0])));
		openb3d_b3dglsdlgraphics_Text(200,180,bbStringConcat(((BBString*)&_s37),bbStringFromFloat(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_alpha [0])));
		openb3d_b3dglsdlgraphics_Text(200,200,bbStringConcat(((BBString*)&_s38),bbStringFromInt(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_blend [0])));
		openb3d_b3dglsdlgraphics_Text(200,220,bbStringConcat(((BBString*)&_s39),bbStringFromInt(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_fx [0])));
		if(((BBOBJECT)((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[0U])!=&bbNullObject){
			openb3d_b3dglsdlgraphics_Text(200,240,bbStringConcat(((BBString*)&_s40),bbStringFromCString(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[0U]->_openb3d_openb3dcore_ttexture_file )));
			openb3d_b3dglsdlgraphics_Text(200,160,bbStringConcat(((BBString*)&_s41),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[0U]->_openb3d_openb3dcore_ttexture_flags [0])));
			openb3d_b3dglsdlgraphics_Text(200,280,bbStringConcat(((BBString*)&_s42),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[0U]->_openb3d_openb3dcore_ttexture_blend [0])));
		}
		if(((BBOBJECT)((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[1U])!=&bbNullObject){
			openb3d_b3dglsdlgraphics_Text(200,300,bbStringConcat(((BBString*)&_s43),bbStringFromCString(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[1U]->_openb3d_openb3dcore_ttexture_file )));
			openb3d_b3dglsdlgraphics_Text(200,320,bbStringConcat(((BBString*)&_s44),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[1U]->_openb3d_openb3dcore_ttexture_flags [0])));
			openb3d_b3dglsdlgraphics_Text(200,340,bbStringConcat(((BBString*)&_s45),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[1U]->_openb3d_openb3dcore_ttexture_blend [0])));
		}
		if(((BBOBJECT)((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[2U])!=&bbNullObject){
			openb3d_b3dglsdlgraphics_Text(200,360,bbStringConcat(((BBString*)&_s46),bbStringFromCString(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[2U]->_openb3d_openb3dcore_ttexture_file )));
			openb3d_b3dglsdlgraphics_Text(200,380,bbStringConcat(((BBString*)&_s47),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[2U]->_openb3d_openb3dcore_ttexture_flags [0])));
			openb3d_b3dglsdlgraphics_Text(200,400,bbStringConcat(((BBString*)&_s48),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[2U]->_openb3d_openb3dcore_ttexture_blend [0])));
		}
		if(((BBOBJECT)((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[3U])!=&bbNullObject){
			openb3d_b3dglsdlgraphics_Text(200,420,bbStringConcat(((BBString*)&_s49),bbStringFromCString(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[3U]->_openb3d_openb3dcore_ttexture_file )));
			openb3d_b3dglsdlgraphics_Text(200,440,bbStringConcat(((BBString*)&_s50),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[3U]->_openb3d_openb3dcore_ttexture_flags [0])));
			openb3d_b3dglsdlgraphics_Text(200,460,bbStringConcat(((BBString*)&_s51),bbStringFromInt(((struct openb3d_openb3dcore_TTexture_obj**)BBARRAYDATA(bbt_ent->_openb3d_openb3dcore_tentity_brush ->_openb3d_openb3dcore_tbrush_tex ,1))[3U]->_openb3d_openb3dcore_ttexture_blend [0])));
		}
	}else{
		openb3d_b3dglsdlgraphics_Text(0,100,((BBString*)&_s52));
	}
}
void openb3d_b3dglsdlgraphics_TDebug_EntityInfo4_v_TTEntityTTCamera(struct openb3d_openb3dcore_TEntity_obj* bbt_ent,struct openb3d_openb3dcore_TCamera_obj* bbt_cam){
	openb3d_b3dglsdlgraphics_Text(0,40,((BBString*)&_s54));
	if(((BBOBJECT)bbt_cam)!=&bbNullObject){
		openb3d_b3dglsdlgraphics_Text(0,80,bbStringConcat(((BBString*)&_s55),bbStringFromInt((bbt_cam)->clas->m_EntityInView_TTEntity((struct openb3d_openb3dcore_TCamera_obj*)bbt_cam,(struct openb3d_openb3dcore_TEntity_obj*)bbt_ent))));
	}else{
		openb3d_b3dglsdlgraphics_Text(0,80,((BBString*)&_s56));
	}
}
BBINT openb3d_b3dglsdlgraphics_TDebug_cno;
BBINT openb3d_b3dglsdlgraphics_TDebug_surf_no;
BBINT openb3d_b3dglsdlgraphics_TDebug_info;
BBINT openb3d_b3dglsdlgraphics_TDebug_show_ents;
struct openb3d_openb3dcore_TMesh_obj* openb3d_b3dglsdlgraphics_TDebug_bounding_sphere;
struct openb3d_openb3dcore_TMesh_obj* openb3d_b3dglsdlgraphics_TDebug_debug_mesh;
struct openb3d_openb3dcore_TSurface_obj* openb3d_b3dglsdlgraphics_TDebug_debug_surf;
struct openb3d_openb3dcore_TMesh_obj* openb3d_b3dglsdlgraphics_TDebug_marker;
struct BBDebugScope_18 openb3d_b3dglsdlgraphics_TDebug_scope ={
	BBDEBUGSCOPE_USERTYPE,
	"TDebug",
	{
		{
			BBDEBUGDECL_GLOBAL,
			"cno",
			"i",
			.var_address=(void*)&openb3d_b3dglsdlgraphics_TDebug_cno
		},
		{
			BBDEBUGDECL_GLOBAL,
			"surf_no",
			"i",
			.var_address=(void*)&openb3d_b3dglsdlgraphics_TDebug_surf_no
		},
		{
			BBDEBUGDECL_GLOBAL,
			"info",
			"i",
			.var_address=(void*)&openb3d_b3dglsdlgraphics_TDebug_info
		},
		{
			BBDEBUGDECL_GLOBAL,
			"show_ents",
			"i",
			.var_address=(void*)&openb3d_b3dglsdlgraphics_TDebug_show_ents
		},
		{
			BBDEBUGDECL_GLOBAL,
			"bounding_sphere",
			":TMesh",
			.var_address=(void*)&openb3d_b3dglsdlgraphics_TDebug_bounding_sphere
		},
		{
			BBDEBUGDECL_GLOBAL,
			"debug_mesh",
			":TMesh",
			.var_address=(void*)&openb3d_b3dglsdlgraphics_TDebug_debug_mesh
		},
		{
			BBDEBUGDECL_GLOBAL,
			"debug_surf",
			":TSurface",
			.var_address=(void*)&openb3d_b3dglsdlgraphics_TDebug_debug_surf
		},
		{
			BBDEBUGDECL_GLOBAL,
			"marker",
			":TMesh",
			.var_address=(void*)&openb3d_b3dglsdlgraphics_TDebug_marker
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"New",
			"()",
			.func_ptr=(BBFuncPtr)&_openb3d_b3dglsdlgraphics_TDebug_New
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"DebugWorld",
			"()",
			.func_ptr=(BBFuncPtr)&openb3d_b3dglsdlgraphics_TDebug_DebugWorld_v
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"DebugEntity",
			"(:TEntity,:TCamera):TEntity",
			.func_ptr=(BBFuncPtr)&openb3d_b3dglsdlgraphics_TDebug_DebugEntity_TTEntity_TTEntityTTCamera
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"UpdateBoundingSphere",
			"(:TEntity)",
			.func_ptr=(BBFuncPtr)&openb3d_b3dglsdlgraphics_TDebug_UpdateBoundingSphere_v_TTEntity
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"UpdateSurface",
			"(:TEntity,:TSurface)",
			.func_ptr=(BBFuncPtr)&openb3d_b3dglsdlgraphics_TDebug_UpdateSurface_v_TTEntityTTSurface
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"UpdateMarker",
			"(:TEntity,:TCamera)",
			.func_ptr=(BBFuncPtr)&openb3d_b3dglsdlgraphics_TDebug_UpdateMarker_v_TTEntityTTCamera
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"EntityInfo1",
			"(:TEntity)",
			.func_ptr=(BBFuncPtr)&openb3d_b3dglsdlgraphics_TDebug_EntityInfo1_v_TTEntity
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"EntityInfo2",
			"(:TEntity,:TSurface)",
			.func_ptr=(BBFuncPtr)&openb3d_b3dglsdlgraphics_TDebug_EntityInfo2_v_TTEntityTTSurface
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"EntityInfo3",
			"(:TEntity,:TSurface)",
			.func_ptr=(BBFuncPtr)&openb3d_b3dglsdlgraphics_TDebug_EntityInfo3_v_TTEntityTTSurface
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"EntityInfo4",
			"(:TEntity,:TCamera)",
			.func_ptr=(BBFuncPtr)&openb3d_b3dglsdlgraphics_TDebug_EntityInfo4_v_TTEntityTTCamera
		},
		{
			BBDEBUGDECL_END
		}
	}
};
struct BBClass_openb3d_b3dglsdlgraphics_TDebug openb3d_b3dglsdlgraphics_TDebug={
	&bbObjectClass,
	bbObjectFree,
	(BBDebugScope*)&openb3d_b3dglsdlgraphics_TDebug_scope,
	sizeof(struct openb3d_b3dglsdlgraphics_TDebug_obj),
	(void (*)(BBOBJECT))_openb3d_b3dglsdlgraphics_TDebug_New,
	bbObjectDtor,
	bbObjectToString,
	bbObjectCompare,
	bbObjectSendMessage,
	0,
	0,
	0
	,0
	,sizeof(void*)
	,openb3d_b3dglsdlgraphics_TDebug_DebugWorld_v
	,openb3d_b3dglsdlgraphics_TDebug_DebugEntity_TTEntity_TTEntityTTCamera
	,openb3d_b3dglsdlgraphics_TDebug_UpdateBoundingSphere_v_TTEntity
	,openb3d_b3dglsdlgraphics_TDebug_UpdateSurface_v_TTEntityTTSurface
	,openb3d_b3dglsdlgraphics_TDebug_UpdateMarker_v_TTEntityTTCamera
	,openb3d_b3dglsdlgraphics_TDebug_EntityInfo1_v_TTEntity
	,openb3d_b3dglsdlgraphics_TDebug_EntityInfo2_v_TTEntityTTSurface
	,openb3d_b3dglsdlgraphics_TDebug_EntityInfo3_v_TTEntityTTSurface
	,openb3d_b3dglsdlgraphics_TDebug_EntityInfo4_v_TTEntityTTCamera
};

void openb3d_b3dglsdlgraphics_Graphics3D(BBINT bbt_width,BBINT bbt_height,BBINT bbt_depth,BBINT bbt_mode,BBINT bbt_rate,BBINT bbt_flags,BBINT bbt_usecanvas){
	BBINT bbt_=bbt_flags;
	if(bbt_==-1){
		bbt_flags=62;
	}else{
		if(bbt_==-2){
			bbt_flags=30;
		}
	}
	BBINT bbt_2=bbt_mode;
	if(bbt_2==0){
		if(bbt_depth==0){
			bbt_depth=brl_system_DesktopDepth(0);
		}
	}else{
		if(bbt_2==1){
			if(bbt_depth==0){
				bbt_depth=brl_system_DesktopDepth(0);
			}
		}else{
			if(bbt_2==2){
				bbt_depth=0;
			}else{
				bbt_depth=0;
			}
		}
	}
	openb3d_openb3dcore_TGlobal3D_InitGlobals_i();
	openb3d_openb3dcore_TGlobal3D_width[0]=bbt_width;
	openb3d_openb3dcore_TGlobal3D_height[0]=bbt_height;
	openb3d_openb3dcore_TGlobal3D_depth[0]=bbt_depth;
	openb3d_openb3dcore_TGlobal3D_Mode[0]=bbt_mode;
	openb3d_openb3dcore_TGlobal3D_rate[0]=bbt_rate;
	brl_graphics_SetGraphicsDriver((struct brl_graphics_TGraphicsDriver_obj*)((struct brl_graphics_TGraphicsDriver_obj*)bbObjectDowncast((BBOBJECT)brl_glmax2d_GLMax2DDriver(),(BBClass*)&brl_graphics_TGraphicsDriver)),((BBLONG)bbt_flags));
	if(bbt_usecanvas==0){
		openb3d_openb3dcore_TGlobal3D_gfx_obj=(struct brl_graphics_TGraphics_obj*)brl_graphics_Graphics(bbt_width,bbt_height,bbt_depth,bbt_rate,((BBLONG)bbt_flags),-1,-1);
	}
	if((bbt_usecanvas==0) && ((bbt_mode==2) || ((bbt_mode==0) && (bbt_depth==0)))){
		if(brl_graphics_GraphicsHeight()>0){
			bbt_height=brl_graphics_GraphicsHeight();
		}
	}
	openb3d_openb3dcore_TGlobal3D_GraphicsInit_i();
	Graphics3D_(bbt_width,bbt_height,bbt_depth,bbt_mode,bbt_rate);
	openb3d_openb3dcore_THardwareInfo_GetInfo_i();
	openb3d_openb3dcore_TGlobal3D_vbo_enabled[0]=openb3d_openb3dcore_THardwareInfo_VBOSupport;
	openb3d_openb3dcore_TGlobal3D_GL_Version=((BBFLOAT)((BBINT)(bbStringToFloat((BBSTRING)openb3d_openb3dcore_THardwareInfo_OGLVersion)*10.0000000f)));
}
void openb3d_b3dglsdlgraphics_Text(BBINT bbt_x,BBINT bbt_y,BBSTRING bbt_txt){
	__glewActiveTexture(33984);
	glDisable((GLenum)2896);
	glColor3ub((GLubyte)openb3d_openb3dcore_TGlobal3D_txt_red,(GLubyte)openb3d_openb3dcore_TGlobal3D_txt_green,(GLubyte)openb3d_openb3dcore_TGlobal3D_txt_blue);
	glEnable((GLenum)3042);
	glBlendFunc((GLenum)770,(GLenum)771);
	brl_glgraphics_source_GLDrawText(bbt_txt,bbt_x,bbt_y);
	glDisable((GLenum)3042);
	glEnable((GLenum)2896);
	glDisable((GLenum)3553);
}
BBINT openb3d_b3dglsdlgraphics_ShadowText(BBSTRING bbt_msg,BBINT bbt_x,BBINT bbt_y){
	BBINT bbt_red=0;
	BBINT bbt_green=0;
	BBINT bbt_blue=0;
	brl_max2d_GetColor((&bbt_red),(&bbt_green),(&bbt_blue));
	brl_max2d_SetColor(0,0,0);
	brl_max2d_DrawText(bbt_msg,((BBFLOAT)(bbt_x+1)),((BBFLOAT)(bbt_y+1)));
	brl_max2d_SetColor(255,255,255);
	brl_max2d_DrawText(bbt_msg,((BBFLOAT)bbt_x),((BBFLOAT)bbt_y));
	brl_max2d_SetColor(bbt_red,bbt_green,bbt_blue);
	return 0;
}
void openb3d_b3dglsdlgraphics_TextColor(BBBYTE bbt_red,BBBYTE bbt_green,BBBYTE bbt_blue){
	openb3d_openb3dcore_TGlobal3D_txt_red=bbt_red;
	openb3d_openb3dcore_TGlobal3D_txt_green=bbt_green;
	openb3d_openb3dcore_TGlobal3D_txt_blue=bbt_blue;
}
static int __bb_openb3d_b3dglsdlgraphics_b3dglsdlgraphics_inited = 0;
int __bb_openb3d_b3dglsdlgraphics_b3dglsdlgraphics(){
	if (!__bb_openb3d_b3dglsdlgraphics_b3dglsdlgraphics_inited) {
		__bb_openb3d_b3dglsdlgraphics_b3dglsdlgraphics_inited = 1;
		GC_add_roots(&openb3d_b3dglsdlgraphics_TDebug_cno, &openb3d_b3dglsdlgraphics_TDebug_marker + 1);
		__bb_brl_blitz_blitz();
		__bb_openb3d_openb3dcore_openb3dcore();
		__bb_openb3d_stbimageloader_stbimageloader();
		__bb_brl_jpgloader_jpgloader();
		__bb_brl_pngloader_pngloader();
		bbObjectRegisterType((BBCLASS)&openb3d_b3dglsdlgraphics_TDebug);
		openb3d_b3dglsdlgraphics_TDebug_cno=0;
		openb3d_b3dglsdlgraphics_TDebug_surf_no=0;
		openb3d_b3dglsdlgraphics_TDebug_info=0;
		openb3d_b3dglsdlgraphics_TDebug_show_ents=0;
		openb3d_b3dglsdlgraphics_TDebug_bounding_sphere=((struct openb3d_openb3dcore_TMesh_obj*)&bbNullObject);
		openb3d_b3dglsdlgraphics_TDebug_debug_mesh=((struct openb3d_openb3dcore_TMesh_obj*)&bbNullObject);
		openb3d_b3dglsdlgraphics_TDebug_debug_surf=((struct openb3d_openb3dcore_TSurface_obj*)&bbNullObject);
		openb3d_b3dglsdlgraphics_TDebug_marker=((struct openb3d_openb3dcore_TMesh_obj*)&bbNullObject);
		openb3d_b3dglsdlgraphics_TDebug_cno=0;
		openb3d_b3dglsdlgraphics_TDebug_surf_no=0;
		openb3d_b3dglsdlgraphics_TDebug_info=1;
		openb3d_b3dglsdlgraphics_TDebug_show_ents=1;
		openb3d_b3dglsdlgraphics_TDebug_bounding_sphere=(struct openb3d_openb3dcore_TMesh_obj*)((struct openb3d_openb3dcore_TMesh_obj*)&bbNullObject);
		openb3d_b3dglsdlgraphics_TDebug_debug_mesh=(struct openb3d_openb3dcore_TMesh_obj*)((struct openb3d_openb3dcore_TMesh_obj*)&bbNullObject);
		openb3d_b3dglsdlgraphics_TDebug_debug_surf=(struct openb3d_openb3dcore_TSurface_obj*)((struct openb3d_openb3dcore_TSurface_obj*)&bbNullObject);
		openb3d_b3dglsdlgraphics_TDebug_marker=(struct openb3d_openb3dcore_TMesh_obj*)((struct openb3d_openb3dcore_TMesh_obj*)&bbNullObject);
		return 0;
	}
	return 0;
}