Phase O Task 3 — verbatim-copy GL infra from Chorizite.OpenGLSDLBackend
into src/AcDream.App/Rendering/Wb/ (namespace AcDream.App.Rendering.Wb).
18 files extracted (all namespace-changed; no algorithm changes):
OpenGLGraphicsDevice, ManagedGLTexture, ManagedGLTextureArray,
ManagedGLVertexBuffer, ManagedGLIndexBuffer, ManagedGLVertexArray,
ManagedGLFrameBuffer, ManagedGLUniformBuffer, GLSLShader, GLHelpers,
GLStateScope, GpuMemoryTracker, SceneData, DebugRenderSettings,
TextureParameters, TextureFormatExtensions, BufferUsageExtensions,
EmbeddedResourceReader.
3 internals promoted to public (O-D9):
EmbeddedResourceReader, TextureFormatExtensions, BufferUsageExtensions.
SixLabors.ImageSharp not reachable: TextureHelpers was placed in
AcDream.Core (no GL/ImageSharp dep); only the GL types went to App.
TextureHelpers.GetCompressedLayerSize added to AcDream.Core.Rendering.Wb
(was in Chorizite.OpenGLSDLBackend.Lib.TextureHelpers; uses
Chorizite.Core.Render.Enums.TextureFormat which Core gets transitively
via the still-present WB project refs).
T3/T4 boundary interims:
- WbMeshAdapter._graphicsDevice stays Chorizite.OpenGLSDLBackend.OpenGLGraphicsDevice
(T4 will swap it when ObjectMeshManager is extracted).
- OpenGLGraphicsDevice.ParticleBatcher deferred to null! (T4 extracts
ParticleBatcher alongside ObjectMeshManager; can't pass `this` of our
new type to the WB-original ctor before T4).
- ManagedGLTextureArray uses our TextureHelpers via explicit alias.
- IUniformBuffer is in Chorizite.Core.dll under Chorizite.OpenGLSDLBackend
namespace (unusual packaging); resolved via type alias.
- AcDream.App.csproj gets explicit Chorizite.Core 0.0.18 PackageReference
(IUniformBuffer + other Chorizite.Core types now used directly in App).
Build green. Test baseline 1147+8 maintained (1902 passing, 8 pre-existing
MotionInterpreterTests failures unrelated to T3).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28 lines
1.8 KiB
C#
28 lines
1.8 KiB
C#
using System.Numerics;
|
|
|
|
namespace AcDream.App.Rendering.Wb {
|
|
// Extracted verbatim from WorldBuilder.Shared/Models/DebugRenderSettings.cs.
|
|
// LandscapeColorsSettings dependency (editor-only, CommunityToolkit.Mvvm) stripped;
|
|
// default color values inlined from LandscapeColorsSettings field initializers.
|
|
public class DebugRenderSettings {
|
|
public bool ShowBoundingBoxes { get; set; } = false;
|
|
public bool SelectVertices { get; set; } = true;
|
|
public bool SelectBuildings { get; set; } = true;
|
|
public bool SelectStaticObjects { get; set; } = true;
|
|
public bool SelectScenery { get; set; } = false;
|
|
public bool SelectEnvCells { get; set; } = true;
|
|
public bool SelectEnvCellStaticObjects { get; set; } = true;
|
|
public bool SelectPortals { get; set; } = true;
|
|
public bool ShowDisqualifiedScenery { get; set; } = true;
|
|
public bool EnableAnisotropicFiltering { get; set; } = true;
|
|
|
|
// Default colors inlined from LandscapeColorsSettings field initializers
|
|
public Vector4 VertexColor { get; set; } = new Vector4(0.7882353f, 0.34901962f, 0.2901961f, 1.0f);
|
|
public Vector4 BuildingColor { get; set; } = new Vector4(0.76862746f, 0.5803922f, 0.25882354f, 1.0f);
|
|
public Vector4 StaticObjectColor { get; set; } = new Vector4(0.37254903f, 0.88235295f, 0.9019608f, 1.0f);
|
|
public Vector4 SceneryColor { get; set; } = new Vector4(0.45490196f, 0.72156864f, 0.32156864f, 1.0f);
|
|
public Vector4 EnvCellColor { get; set; } = new Vector4(0.5294118f, 0.44705883f, 0.7882353f, 1.0f);
|
|
public Vector4 EnvCellStaticObjectColor { get; set; } = new Vector4(0f, 0.49803922f, 1f, 1.0f);
|
|
public Vector4 PortalColor { get; set; } = new Vector4(1f, 0f, 1f, 1.0f);
|
|
}
|
|
}
|