dxBrushColor(brush%,red#,green#,blue#)

Parameters

brush - brush handle
red# - red value of brush
green# - green value of brush
blue# - blue value of brush

Description

Sets the colour of a brush.

The green, red and blue values should be in the range 0-255. The default brush dxColor is 255,255,255.

Please note that if dxEntityFX or dxBrushFX flag 2 is being used, brush colour will have no effect and vertex colours will be used instead.

Example

; dxBrushColor Example
; ------------------

dxGraphics3D 640,480
dxSetBuffer dxBackBuffer()

camera=dxCreateCamera()

light=dxCreateLight()
dxRotateEntity light,90,0,0

cube=dxCreateCube()
dxPositionEntity cube,0,0,5

; Create brush
brush=dxCreateBrush()

; Set brush dxColor
dxBrushColor brush,0,0,255

; Paint mesh with brush
PaintMesh cube,brush

While Not dxKeyDown( 1 )

pitch#=0
yaw#=0
roll#=0

If dxKeyDown( 208 )=True Then pitch#=-1
If dxKeyDown( 200 )=True Then pitch#=1
If dxKeyDown( 203 )=True Then yaw#=-1
If dxKeyDown( 205 )=True Then yaw#=1
If dxKeyDown( 45 )=True Then roll#=-1
If dxKeyDown( 44 )=True Then roll#=1

dxTurnEntity cube,pitch#,yaw#,roll#

dxRenderWorld
dxFlip

Wend

End

Index