Skip to content

CameraCullingSource

Narta Xaymar Dirks edited this page Oct 28, 2026 · 2 revisions

CameraCullingSource

CameraCullingSource:Void camera_a:Int32, camera_b:Int32=0
Parameter Mode Type Default Description
camera_a In Int32 required The camera that takes the culling.
camera_b In Int32 0 The camera whose culling it is, or 0 for its own.

Description

Lets camera_a draw what camera_b would draw: camera_a does not decide by itself what is outside of its view, it uses the view and the CameraCulling setting of camera_b, and does not cull on top of that. Giving 0 as camera_b (the default) makes camera_a cull for itself again. This is a BlitzLLVM extension.

It is for cameras that look at the same world from a place that is close to another camera: a mirror or a security monitor can show what the main camera sees, and a camera that does not draw (CameraProjMode camera, 0) can be the one that decides. The culling follows camera_b from frame to frame as it is moved. A camera that has a source of its own is followed one step further, a loop of cameras or a camera that was freed ends the chain at the camera where it stops. The pictures that mirrors (pivots of the class Mirror) make are seen from somewhere else, and keep culling by themselves.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
main = CreateCamera()
PositionEntity main, 0, 0, -10
monitor = CreateCamera()
CameraViewport monitor, 0, 0, 100, 75
PositionEntity monitor, 0, 20, -10
; The monitor draws what the main camera draws, so nothing is culled twice.
CameraCullingSource monitor, main
RenderWorld

Related Commands

CameraClsColor, CameraClsMode, CameraCulling, CameraFogColor, CameraFogMode, CameraFogRange, CameraProject, CameraProjMode

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally