summaryrefslogtreecommitdiff
path: root/src/3d/renderer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3d/renderer.h')
-rw-r--r--src/3d/renderer.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/3d/renderer.h b/src/3d/renderer.h
index 11a7931..8f933b5 100644
--- a/src/3d/renderer.h
+++ b/src/3d/renderer.h
@@ -78,6 +78,10 @@ class Renderer3D {
bvh_enabled_ = enabled;
}
+ // Call before init(). When true, renders directly to surface (no post-process
+ // Y-flip): uses standard perspective (Y not negated) and CCW winding.
+ void set_direct_render(bool v) { direct_render_ = v; }
+
struct MeshGpuData {
WGPUBuffer vertex_buffer;
WGPUBuffer index_buffer;
@@ -120,6 +124,7 @@ class Renderer3D {
BVH cpu_bvh_; // Keep a CPU-side copy for building/uploading
bool bvh_enabled_ = true;
+ bool direct_render_ = false; // true = render to surface (no post-process flip)
std::map<AssetId, MeshGpuData> mesh_cache_;
const MeshGpuData* temp_mesh_override_ = nullptr; // HACK for test_mesh tool