mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
LibGL: Allow function name override in API definitions
Instead of limiting ourselves to the key of the property in the JSON, allow overriding the function name so we can generate completely different function signatures with very similar names to other existing API methods (e.g. `glUniform*` vs `glUniform*v`).
This commit is contained in:
parent
eb4632e08a
commit
60bd458ed2
1 changed files with 1 additions and 0 deletions
|
@ -304,6 +304,7 @@ Vector<FunctionDefinition> create_function_definitions(ByteString function_name,
|
|||
// Create functions for each name and/or variant
|
||||
Vector<FunctionDefinition> functions;
|
||||
|
||||
function_name = function_definition.get_byte_string("name"sv).value_or(function_name);
|
||||
auto return_type = function_definition.get_byte_string("return_type"sv).value_or("void");
|
||||
auto function_implementation = function_definition.get_byte_string("implementation"sv).value_or(function_name.to_snakecase());
|
||||
auto function_unimplemented = function_definition.get_bool("unimplemented"sv).value_or(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue