Skip to content

Game.Rendering.PreCullingFlags

Assembly:
Game (inferred from project/namespace)

Namespace: Game.Rendering

Type:
enum (flags)

Base:
System.Enum (underlying type: System.UInt32)

Summary:
Bit flags used by the rendering/pre-culling system to mark per-object state during the pre-culling and early rendering update passes. The enum is decorated with [Flags], so multiple flags may be combined to represent a set of states (spatial, lifecycle, rendering, and effect-related) for an instance that the renderer processes. These flags influence culling decisions, update behavior, batching, and visual effects.


Fields

  • PassedCulling = 0x1 (1u)
    Indicates the object passed visibility culling and should be considered for rendering.

  • NearCamera = 0x2 (2u)
    Marks objects considered near the camera (used to prioritize updates or higher-detail processing).

  • NearCameraUpdated = 0x4 (4u)
    Indicates that the near-camera status has been freshly updated for this frame.

  • Deleted = 0x8 (8u)
    The object has been marked for deletion (should be removed/ignored by renderer).

  • Updated = 0x10 (16u)
    The object was updated this frame (general-purpose update flag).

  • Created = 0x20 (32u)
    The object was created this frame (initialization may be required).

  • Applied = 0x40 (64u)
    Changes have been applied to the object (e.g., GPU resources or state transitions completed).

  • BatchesUpdated = 0x80 (128u)
    Indicates that rendering batches involving this object have been updated.

  • Temp = 0x100 (256u)
    Temporary/state-transition flag used during intermediate steps.

  • FadeContainer = 0x200 (512u)
    The object is part of a fade container (used for fading in/out visuals).

  • Object = 0x400 (1024u)
    Marks a generic object category (context-specific — often distinguishes general scene objects).

  • Net = 0x800 (2048u)
    Marks network-related objects (roads/segments) or objects belonging to the net system.

  • Lane = 0x1000 (4096u)
    Marks lane-specific elements (subparts of network segments).

  • Zone = 0x2000 (8192u)
    Marks zoned objects (buildings/areas related to zoning system).

  • InfoviewColor = 0x4000 (16384u)
    Indicates infoview coloring is applied/updated for this object.

  • BuildingState = 0x8000 (32768u)
    Marks building-state related updates (e.g., construction/demolition state).

  • TreeGrowth = 0x10000 (65536u)
    Indicates tree growth-related updates for vegetation objects.

  • LaneCondition = 0x20000 (131072u)
    Marks lane condition-related updates (traffic/lane visuals).

  • InterpolatedTransform = 0x40000 (262144u)
    Object uses an interpolated transform for smoother motion between simulation steps.

  • Animated = 0x80000 (524288u)
    The object has animation that must be evaluated or is animated.

  • Skeleton = 0x100000 (1048576u)
    Indicates skeletal animation data is present/used.

  • Emissive = 0x200000 (2097152u)
    Emissive properties/lighting need to be considered or updated.

  • VehicleLayout = 0x400000 (4194304u)
    Related to vehicle layout/representation (vehicles or their render layout).

  • EffectInstances = 0x800000 (8388608u)
    There are effect instances (particles, special effects) associated with the object.

  • Relative = 0x1000000 (16777216u)
    Indicates positional data is relative (used for transform calculations or streaming).

  • SurfaceState = 0x2000000 (33554432u)
    Marks surface/terrain-related state for the object.

  • SurfaceDamage = 0x4000000 (67108864u)
    Surface damage (deformation/deterioration visuals) is present/updated.

  • ColorsUpdated = 0x8000000 (134217728u)
    Color information was updated this frame (triggers re-upload or recolor).

  • SmoothColor = 0x10000000 (268435456u)
    Smooth color blending/transition is applied or required.

Properties

  • None (enum type; use bitwise operations to query/set flags)

Constructors

  • None (enum type)

Methods

  • None (enum members only). Use standard enum operations and bitwise checks.

Usage Example

// Set multiple flags
PreCullingFlags flags = PreCullingFlags.PassedCulling | PreCullingFlags.Updated | PreCullingFlags.Emissive;

// Add a flag
flags |= PreCullingFlags.BatchesUpdated;

// Remove a flag
flags &= ~PreCullingFlags.Temp;

// Test a flag (preferred for performance in tight loops)
if ((flags & PreCullingFlags.PassedCulling) != 0)
{
    // object passed culling — include in render list
}

// Test combined flags
if ((flags & (PreCullingFlags.NearCamera | PreCullingFlags.NearCameraUpdated)) != 0)
{
    // near-camera logic...
}

Notes: - The enum is flagged with [Flags], so combine values with bitwise OR and test with bitwise AND. Avoid Enum.HasFlag in performance-critical code paths (it is slower than bitwise checks). - These flags are intended for use by the renderer/pre-culling pipeline to coordinate updates, batching and rendering decisions; they may be set/checked across update and render threads, so follow the engine's synchronization conventions when modifying them.