Commit Graph

8 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks 903d416607 gfx-shader-param: Fix get_parameter 2019-12-25 19:09:30 +01:00
Michael Fabian 'Xaymar' Dirks 1902d005e9 gfx-shader-param: Add support for automatic parameters
Allows other parameters to be a seed to these parameters.
2019-12-25 10:14:04 +01:00
Michael Fabian 'Xaymar' Dirks 4acbfedd40 gfx-shader-param: Support for input, slider, enum and more 2019-12-25 10:09:56 +01:00
Michael Fabian 'Xaymar' Dirks 777556f4f6 gfx-shader-param: Vastly improve parameter functionality
Allow for overriding type and size of an element, opening the path for `int#[]`, `float#[]`, `int#x#`, `float#x#`, `bool#x#`, `vector<type, #>` and `matrix<type, #, #>`. Also allows for specifying the exact type of texture instead of hoping the user gets it right, as well as samplers.

Parameters are also now created if they are invisible, which means that the properties() function must not be called, but they must still be used like any other. This is due to a problem with default values not being applied all the time, and sometimes just vanishing.

The code also now throws exceptions with reasonable text, which should be caught by the gfx::shader implementation and refuse a load of the effect. No other state should be modified at that point, so care must be taken that up until the moment the complete initialization is done no other state is modified.
2019-12-24 22:02:37 +01:00
Michael Fabian 'Xaymar' Dirks eab3ae4fbc gfx-shader-param: Add support for order and overall name/desc 2019-12-24 08:38:01 +01:00
Michael Fabian 'Xaymar' Dirks 672c6d39af gfx-shader-param: Split setting defaults from properties 2019-12-22 06:07:37 +01:00
Michael Fabian 'Xaymar' Dirks 0a761b97a2 gfx-shader-param*: Initial code 2019-12-18 06:39:07 +01:00
Michael Fabian 'Xaymar' Dirks 0ad896e905 gfx-shader: Rename from gfx-effect-source 2019-12-15 09:09:11 +01:00