Opened 8 years ago

Closed 8 years ago

#834 closed defect (fixed)

lua error with hardware not supporting shaders in luaui/widgets/gui_highlight_units.lua

Reported by: abma Owned by:
Priority: major Milestone:
Component: BAR Version:
Keywords: Cc:


luaui/widgets/gui_highlight_units.lua fails on computers without shader: "These functions are ONLY available if the graphic board supports GLSL.

Please test in your scripts if one of them exists before you use them!"

adding this at the beginning of the widget works:

if not gl.DeleteShader or not gl.CreateShader then

Spring.Log("gui_highlight_units.lua", LOG.WARNING, "Shaders are not supported, disabled") return false


but i want the widget to be still shown in the widget list, but disabled. is this possible in a clean way?

Change History (2)

comment:1 by abma, 8 years ago

note: feel free to commit, i'm just curious about the solution :)

comment:2 by Bluestone, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.