ok, i will upload also a zip version.
no, just use the max2d commands after the renderworld() function. Maybe you should set the Blending mode to Alphablend
to avoid the black border around text.
eg: a modified version of the collision example:
PS: The zip Version will take some time as I don't have access
to a proper zip or rar packer from my current (work) maschine.
no, just use the max2d commands after the renderworld() function. Maybe you should set the Blending mode to Alphablend
to avoid the black border around text.
eg: a modified version of the collision example:
Import sidesign.minib3d Strict Local width=640,height=480,depth=16,mode=0 Graphics3D width,height,depth,mode Local cam:TCamera=CreateCamera() CameraRange cam,.5,500 PositionEntity cam,0,10,-10 Local light:TLight=CreateLight(1) RotateEntity light,90,0,0 Local mesh:TMesh=LoadMesh("media/test.b3d") ScaleEntity mesh,10,10,10 ' create mesh octree - makes collision detection faster (MiniB3D only) CreateOctree(mesh,200,5) ' set camera entity type to 1 EntityType cam,1 ' set camera radius as it's the source collision entity EntityRadius cam,1 ' set mesh entity type to 2 EntityType mesh,2 ' use collisions command to enable colliisons between entity type 1 and 2, with reponse 4 Collisions 1,2,4,2 ' used by camera code Local mxs#=0 Local mys#=0 Local move#=0.5 MouseXSpeed() ' flush MouseYSpeed() ' flush ' used by fps code Local old_ms=MilliSecs() Local renders Local fps While Not KeyDown(KEY_ESCAPE) If KeyHit(KEY_ENTER) Then DebugStop '' control camera ' mouse look mxs#=mxs#+(MouseXSpeed()/5.0) mys#=mys#+(MouseYSpeed()/5.0) RotateEntity cam,mys#,-mxs#,0 MoveMouse width/2,height/2 MouseXSpeed() ' flush MouseYSpeed() ' flush ' move camera forwards/backwards/left/right with cursor keys If KeyDown(KEY_UP)=True Then MoveEntity cam,0,0,move# ' move camera forward If KeyDown(KEY_DOWN)=True Then MoveEntity cam,0,0,-move# ' move camera back If KeyDown(KEY_LEFT)=True Then MoveEntity cam,-move#,0,0 ' move camera left If KeyDown(KEY_RIGHT)=True Then MoveEntity cam,move#,0,0 ' move camera right '' UpdateWorld RenderWorld renders=renders+1 ' calculate fps If MilliSecs()-old_ms>=1000 old_ms=MilliSecs() fps=renders renders=0 EndIf SetBlend AlphaBlend DrawText "FPS: "+String(fps),0,0 SetAlpha 0.5 If KeyDown(Key_Space) SetColor 255,0,0 DrawRect 30,30,300,300 EndIf SetColor 255,255,255 Flip Wend End
PS: The zip Version will take some time as I don't have access
to a proper zip or rar packer from my current (work) maschine.