云风
云风
Have a look https://github.com/cloudwu/bgfxidl/blob/master/bgfx.idl#L42-L62 . ```lua --- Vertex attribute enum. enum.Attrib { comment = "Corresponds to vertex shader attribute." } .Position "a_position" .Normal "a_normal" .Tangent "a_tangent" .Bitangent "a_bitangent" .Color0 "a_color0"...
@bkaradzic You can annotate default values for functions first. https://github.com/cloudwu/bgfxidl/commit/312ee1c309414193cc625976b215c5d3b4fe2671 numbers, true, false, NULL, and INT*_MAX can be used directly, others should be quoted like `{ default = "TextureFormat::Count" }`
define struct ```lua --- Platform data. struct.PlatformData { ctor } .ndt "void*" "Native display type." -- or { comment = "Native display type." } .nwh "void*" "Native window handle." .context...
Array type is supported. See https://github.com/cloudwu/bgfxidl/commit/e3602845ed4bf57069d0971cbb5d453b2190f288
fixed https://github.com/cloudwu/bgfxidl/commit/f2a27f1fd2bc4dd89a35b19c5ef38a7c9a0f344a
just call genidl( template, outputfilename, indent) for each file https://github.com/cloudwu/bgfxidl/blob/master/bgfx-idl.lua#L280
How about https://github.com/cloudwu/bgfxidl/commit/69f53e6871aae021e69cfed18cf944868b54aaad ? `doIdl()` will not trigger by default except we pass `path` from command line. And, If the generate codes has no change , we do not touch...
https://github.com/cloudwu/bgfxidl/commit/3aaa74faa22ff84e6a4bee1c135d7b2a2a886dcd This would be a better solution. I haven't seen the doubles indent in `bgfx.idl.inl` .
I see. It's the same issue of `string.gsub` , it can't replace `\t` with itself (in some old lua version). https://github.com/cloudwu/bgfxidl/commit/86cc4950f6551ac86c718e30db3d8feab2308fb9 may fix it.
I separated `gen.gen()` to four api : `apply` , `format`, `write`, and `changed` . https://github.com/cloudwu/bgfxidl/blob/master/bgfx-idl.lua#L6-L8