Skip to content

SetCameraStencilClear

Narta Xaymar Dirks edited this page Nov 25, 2026 · 1 revision

SetCameraStencilClear

SetCameraStencilClear:Void camera:Int32, clear:Int32, value:Int32=0
Parameter Mode Type Default Description
camera In Int32 required Camera handle.
clear In Int32 required True to clear the stencil, False to keep it.
value In Int32 0 What it is cleared to, from 0 to 255.

Description

Sets whether a camera with a stencil (SetCameraStencil) clears the stencil of its viewport when it starts drawing, and to which value. By default it clears it to 0. A camera that does not clear the stencil keeps what was drawn before, by the last frame or by a camera that drew earlier in the same RenderWorld. This is a BlitzLLVM extension.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
SetCameraStencil camera, True
; Start with 1 everywhere: entities that test for 1 are drawn until something changes it.
SetCameraStencilClear camera, True, 1
cube = CreateCube()
PositionEntity cube, 0, 0, 5
SetEntityStencil cube, 2, 1
RenderWorld
Flip
WaitKey

Related Commands

CameraClsColor, GetCameraStencil, SetCameraBuffer, SetCameraClipPlane, SetCameraClipPlaneEnabled, SetCameraProjectionMatrix, SetCameraStencil, SetCameraViewMatrix

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally