; dxCameraViewport Example ; ---------------------- dxGraphics3D 640,480 dxSetBuffer dxBackBuffer() ; Create first camera cam1=dxCreateCamera() ; Set the first camera's viewport so that it fills the top half of the camera dxCameraViewport cam1,0,0,dxGraphicsWidth(),dxGraphicsHeight()/2 ; Create second camera cam2=dxCreateCamera() ; Set the second camera's viewport so that it fills the bottom half of the camera dxCameraViewport cam2,0,dxGraphicsHeight()/2,dxGraphicsWidth(),dxGraphicsHeight()/2 light=dxCreateLight() dxRotateEntity light,90,0,0 plane=dxCreatePlane() grass_tex=dxLoadTexture( "media/mossyground.bmp" ) dxEntityTexture plane,grass_tex dxPositionEntity plane,0,-1,0 While Not dxKeyDown( 1 ) If dxKeyDown( 205 )=True Then dxTurnEntity cam1,0,-1,0 If dxKeyDown( 203 )=True Then dxTurnEntity cam1,0,1,0 If dxKeyDown( 208 )=True Then dxMoveEntity cam1,0,0,-0.05 If dxKeyDown( 200 )=True Then dxMoveEntity cam1,0,0,0.05 dxRenderWorld dxText 0,0,"Use cursor keys to move the first camera about the infinite plane" dxFlip Wend End