Sets camera clear mode flags (color buffer, depth buffer, 1=clear 0=skip).
Takes camera (camera entity handle), color (1=clear color buffer, 0=skip), depth (1=clear depth buffer, 0=skip).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
cameraInt
colorInt
depthInt
Returns
Void
Quick Summary
Sets camera clear mode flags (color buffer, depth buffer, 1=clear 0=skip).
Takes camera (camera entity handle), color (1=clear color buffer, 0=skip), depth (1=clear depth buffer, 0=skip).
Returns nothing.
Technical Exegesis...
Sets camera clear mode flags (color buffer, depth buffer, 1=clear 0=skip). Takes camera (camera entity handle), color (1=clear color buffer, 0=skip), depth (1=clear depth buffer, 0=skip). Returns nothing. Validates entity is camera type, allocates camera->Camera3D if null, sets camera->clsColor=(color!=0) and camera->clsDepth=(depth!=0). Controls which buffers cleared before rendering.
This function controls buffer clearing.
Sets camera clear mode flags (color buffer, depth buffer, 1=clear 0=skip). Takes camera (camera entity handle), color (1=clear color buffer, 0=skip), depth (1=clear depth buffer, 0=skip). Returns nothing. Validates entity is camera type, allocates camera->Camera3D if null, sets camera->clsColor=(color!=0) and camera->clsDepth=(depth!=0). Controls which buffers cleared before rendering.
This function controls buffer clearing. Color buffer: if clsColor=true (color!=0), color buffer cleared to clearColor before rendering (background filled with clear color, typical default), if clsColor=false (color=0), color buffer retains previous frame contents (enables motion blur, accumulation buffer effects, trails). Depth buffer: if clsDepth=true (depth!=0), depth buffer cleared to far plane before rendering (typical default, prevents depth contamination from previous frame), if clsDepth=false (depth=0), depth buffer retains previous frame contents (unusual, can cause rendering artifacts). Use cases: (1) Normal rendering (color=1, depth=1 for clean frame), (2) Motion blur (color=0 to accumulate frames), (3) Trails effect (color=0 for object trails), (4) Multi-pass rendering (skip clears for additional passes), (5) Overlay cameras (color=0 to render over existing frame). Common patterns: standard b3dCameraClsMode(camera, 1, 1), motion blur b3dCameraClsMode(camera, 0, 1), trails b3dCameraClsMode(camera, 0, 1) with alpha blending. Typical usage: leave both enabled (1,1) for normal rendering, disable color clear (0,1) for accumulation effects, never disable depth clear unless specific multi-pass technique. Accumulation buffer: disabling color clear (color=0) accumulates frames (each frame alpha-blends over previous, creates trails/motion blur, requires alpha blending enabled). Depth clearing: almost always enable depth clear (depth=1), disabling causes depth corruption (objects from previous frame block current frame geometry, usually undesirable). Camera allocation: if camera->camera==nullptr, allocates new Camera3D. Related: b3dCameraClsColor sets clear color (used if clsColor=1), color/depth clearing for buffer management.