Skip to content

Remove stale compile-time feature flags and legacy OpenGL cvar plumbing#260

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/feature-flag-cleanup-065c
Draft

Remove stale compile-time feature flags and legacy OpenGL cvar plumbing#260
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/feature-flag-cleanup-065c

Conversation

@cursor

@cursor cursor Bot commented Jun 14, 2026

Copy link
Copy Markdown

Flags removed

Flag / plumbing Why safe to delete
USE_VBO_GRID Always defined when USE_VBO is on (tr_local.h); no off-path in Vulkan builds
USE_TESS_NEEDS_NORMAL / USE_TESS_NEEDS_ST2 Macros commented out and never enabled; active code path already always gathered normals and lightmap ST2
r_allowSoftwareGL / r_glDriver registration OpenGL renderer removed; Vulkan-only builds use USE_VULKAN_API without USE_OPENGL_API. Cvars now only register when USE_OPENGL_API is defined; SDL GL attribute block wrapped likewise

Behavioral parity

  • VBO grid surfaces: Grid VBO build/render path unchanged — only #ifdef wrappers removed
  • Tessellation: Normals and lightmap coords still copied unconditionally (same as prior default when USE_TESS_NEEDS_* was undefined)
  • Vulkan client: No longer exposes ignored legacy OpenGL cvars in default Vulkan-only configuration

Checks performed

  • ./scripts/compile_engine.sh vulkan — clean build
  • ctest -R test_vulkan_regression_source_guards — passed
  • ./scripts/smoke_test.sh — passed (includes q3_openarena_compat_check.sh)

Not in scope (low confidence)

Runtime cvars with real off-paths (r_renderMode, r_forwardPlus, r_vbo, r_pbr, RTX toggles) left unchanged.

Open in Web View Automation 

- Unwrap USE_VBO_GRID (always enabled with USE_VBO) in Vulkan renderer
- Remove dead USE_TESS_NEEDS_NORMAL/ST2 conditional branches (never defined)
- Gate r_allowSoftwareGL/r_glDriver behind USE_OPENGL_API (Vulkan-only builds)

Co-authored-by: Tim Fox <timfox@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant