Wireframe viewports

Blitz3D Forums/Blitz3D Programming/Wireframe viewports

Anyone have any ideas on how to create these? What I want is a Front, Top, Left(or Right) viewport system for an editor im working on.

Any help would be appreciated :)

Define a viewport, rotate and position the camera, possibly use Ortho mode or just a high zoom if you want to remove perspective, and render it with wireframe mode enabled.

Well, more specifially I would think you define each viewport at say 0,0 with a width/height of 200,200 (example)

hide all cameras, show one, render, copyrect to a image buffer, hide, show next, render, copyrect, etc, etc

At the end just draw all four images to the screen where you want the viewports visible.

Well yes, if you want to move the viewports partially off screen in a windows type way, otherwise you might just as well render each one directly where you want it with far less overhead.

Create 3 cameras, set their viewpoints to a quarter of the screen size, and position accordingly. Place one above the object, one to the side and one in front of the object. Point all cameras at the object.

Hide all cameras save for one
Render wireframe
Hide the camera and show another one and render again
hide this camera and show the final one.

Graphics3D 800,600
SetBuffer BackBuffer()

cone=CreateCone(6)
cube=CreateCube()

EntityColor cube,255,128,128
EntityColor cone,128,128,64

effectlight=CreateLight(1)
PositionEntity effectlight,40,30,40
PointEntity effectlight,cube

topcam=CreateCamera()
CameraViewport topcam,0,300,400,300
CameraProjMode topcam,2

sidecam=CreateCamera()
CameraViewport sidecam,0,0,400,300
CameraProjMode sidecam,2

frontcam=CreateCamera()
CameraViewport frontcam,400,0,400,300
CameraProjMode frontcam,2

rendercam=CreateCamera()
CameraViewport rendercam,400,300,400,300

PositionEntity cone,50,0,50

PositionEntity cube,52,0,50

PositionEntity topcam, 51,10,50
PositionEntity sidecam, 61,0,50
PositionEntity frontcam, 51,0,60
PositionEntity rendercam, 56,5,55

PointEntity topcam,cone
TurnEntity topcam,0,0,180
PointEntity sidecam,cone
PointEntity frontcam,cone
PointEntity rendercam,cone

EntityParent topcam,cone
EntityParent sidecam,cone
EntityParent frontcam,cone
EntityParent rendercam,cone

While Not KeyDown(1)

TranslateEntity cone,(KeyDown(208)-KeyDown(200)),0,0
TranslateEntity cone,0,0,(KeyDown(203)-KeyDown(205))
WireFrame True

HideEntity rendercam
ShowEntity sidecam
ShowEntity topcam
ShowEntity frontcam

RenderWorld
Flip

WireFrame False

ShowEntity rendercam
HideEntity sidecam
HideEntity topcam
HideEntity frontcam

RenderWorld
Flip

Wend



-----------Edit-----------=

Now tested and altered.

Note that because of Bl;itz' self-righting, the 'Topcam' needs to be Rotated AFTER the PointEntity command.

ok thanks guys will give it a try