b3dSetEntityRenderFlags

Sets entity render flags bitfield controlling rendering behavior (fullbright, culling, fog, vertex colors, flat shading). Takes entity (entity handle from b3dCreate* functions, positive integer), flags (bitwise render flags integer). Returns nothing.

3D Graphics

Parameters & Returns

Parameters

entity Int
flags Int

Returns

Void

Quick Summary

Sets entity render flags bitfield controlling rendering behavior (fullbright, culling, fog, vertex colors, flat shading). Takes entity (entity handle from b3dCreate* functions, positive integer), flags (bitwise render flags integer). Returns nothing.

Technical Exegesis...

Sets entity render flags bitfield controlling rendering behavior (fullbright, culling, fog, vertex colors, flat shading). Takes entity (entity handle from b3dCreate* functions, positive integer), flags (bitwise render flags integer). Returns nothing. Validates entity exists and is mesh or terrain type, sets material.entityRenderFlags for main material and all submesh materials, modifies rendering pipeline behavior via shader and PSO selection.

Example

Example.bam
; Skybox example - fullbright + no culling
skybox:Int = b3dCreateCube(BBR_ONE_SLOT, BBR_TEXTURE_UV, 0)
b3dSetEntityRenderFlags(skybox, 17)  ; 1 + 16 = fullbright + no culling
b3dScaleEntity(skybox, 500, 500, 500)

; Glowing sign - fullbright only
sign:Int = b3dLoadMesh("sign.glb", BBR_ONE_SLOT, BBR_TEXTURE_UV, 0)
b3dSetEntityRenderFlags(sign, 1)  ; Fullbright, ignores lighting

; Double-sided leaves - no culling
leaves:Int = b3dLoadMesh("leaves.glb", BBR_ONE_SLOT, BBR_TEXTURE_UV, 0)
b3dSetEntityRenderFlags(leaves, 16)  ; Visible from both sides

; Vertex-colored terrain with fog
terrain:Int = b3dLoadMesh("terrain.glb", BBR_ONE_SLOT, BBR_TEXTURE_UV, 0)
b3dSetEntityRenderFlags(terrain, 2)  ; Use vertex colors for blending

; Fullbright + no fog + no culling
crystal:Int = b3dCreateSphere(BBR_ONE_SLOT, BBR_TEXTURE_UV, 0, 16, 16)
b3dSetEntityRenderFlags(crystal, 25)  ; 1 + 8 + 16 = all three flags