Skip to content

BrushTexture

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

BrushTexture

BrushTexture:Void brush:Int32, texture:Int32, frame:Int32=0, index:Int32=0
Parameter Mode Type Default Description
brush In Int32 required The brush.
texture In Int32 required The texture to put on the brush.
frame In Int32 0 Frame of an animated texture. Defaults to 0.
index In Int32 0 Layer number. Defaults to 0.

Description

Puts a texture on one of the layers of the brush. Layer 0 is the base texture, further layers are blended on top of it using TextureBlend. For a texture from LoadAnimTexture the frame chooses the cell to show.

Differences

  • Layers 0 to 7 are accepted. The original help documents only 0 to 3 for this command.
  • A debug build (-d) stops the program when the texture is not 0 and does not exist, see Debug handle checks.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
CameraClsColor camera, 70, 100, 160
light = CreateLight()
RotateEntity light, 40, 30, 0

tex = CreateTexture(64, 64, 1 + 4096)
SetBuffer TextureBuffer(tex)
ClsColor 250, 240, 200
Cls
Color 190, 70, 40
Rect 0, 0, 32, 32, 1
Rect 32, 32, 32, 32, 1
SetBuffer BackBuffer()

brush = CreateBrush(255, 255, 255)
BrushTexture brush, tex
cube = CreateCube()
PositionEntity cube, 0, 0, 4.4
TurnEntity cube, 25, 35, 0
PaintEntity cube, brush
RenderWorld
Flip
WaitKey

Media

BrushTexture

Related Commands

BrushAlpha, BrushBlend, BrushColor, BrushFX, BrushShininess, CreateBrush, FreeBrush, GetBrushTexture

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally