acdream/src/AcDream.App/Rendering/Wb/InstanceData.cs
Erik c0326523ac fix(O-T4): address spec-review findings — InstanceData + using cleanups
Four fixes from T4 spec review:

1. Extracted InstanceData.cs (14-line struct) verbatim to
   src/AcDream.App/Rendering/Wb/InstanceData.cs (per O-D1).

2. ObjectMeshManager.cs: replaced `using Chorizite.OpenGLSDLBackend.Lib;`
   with `using AcDream.Core.Rendering.Wb;` (TextureHelpers comes from
   our T2 Core extraction; InstanceData comes from new T4 cleanup).

3. EmbeddedResourceReader.GetEmbeddedResource promoted from `internal`
   to `public` per O-D9 intent (the type promotion only changed the
   class signature in T3; this finishes the spec).

4. OpenGLGraphicsDevice.cs: removed stale T3 interim comment at
   lines 142-145 — T4 resolved the ParticleBatcher construction
   via post-ctor assignment in WbMeshAdapter.cs:78.

Build green; tests green (1147 passing, 8 pre-existing failures
baseline maintained).

Spec: docs/superpowers/specs/2026-05-21-phase-o-dat-path-unification-design.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 16:50:05 +02:00

15 lines
507 B
C#

using System.Numerics;
using System.Runtime.InteropServices;
namespace AcDream.App.Rendering.Wb {
[StructLayout(LayoutKind.Sequential, Pack = 16)]
public struct InstanceData {
public const uint INSTANCE_FLAG_DISQUALIFIED = 1u;
public Matrix4x4 Transform; // 64 bytes
public uint CellId; // 4 bytes
public uint Flags; // 4 bytes
private uint _pad1; // 4 bytes
private uint _pad2; // 4 bytes -> total 80 bytes
}
}