Opened 6 years ago

Closed 6 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:

Description

luaui/widgets/gui_highlight_units.lua fails on computers without shader:

http://springrts.com/wiki/Lua_GLSL_Api "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

end

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, 6 years ago

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

comment:2 by Bluestone, 6 years ago

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