beyond-all-reason / beyond-all-reason/RecoilEngine

Check `Platform.glFoo` in headless

Open
#1,834 3 comments 0 reactions 0 assignees View on GitHub
area: Lua API bug
Dominant language
C++
Stars
683
Forks
293
Avg merge
3d 2h
Merged PRs (30d)
40

Description

`Platform.glHaveGLSL` is defined to `true`, this is incorrect since headless doesn't actually have GLSL:
https://github.com/beyond-all-reason/spring/blob/34671c0200e9be08ec2c51c6291353b760fbc69b/rts/Lua/LuaConstPlatform.cpp#L96

The task is to figure out which entries are incorrect this way, and fix them. I assume that in headless, all the `glHaveFoo` and `glSupportFoo` should be `false`, `availableVideoModes` should probably be empty, and `numDisplays` should probably be 0. Double-check this.

Stuff like `glVersion` probably stays as-is. Perhaps there could be a `Platform.isHeadless` or `Engine.isHeadless` as well?

Contributor guide

Open the contributing guide

Research direction

Start in rts/Lua/LuaConstPlatform.cpp at the glHaveGLSL definition and inspect the related glHaveFoo, glSupportFoo, availableVideoModes, numDisplays, and version entries. Compare their headless behavior with the issue’s expectations, then correct values that are demonstrably wrong; done means headless reports no unavailable GLSL or video hardware while values such as glVersion remain appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, lua
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.