cloudwu / bgfxidl

An IDL for bgfx
28 stars 5 forks source link

Fixed IDL. #10

Closed bkaradzic closed 5 years ago

bkaradzic commented 5 years ago

Generated code when dropped into bgfx builds! Yey! :+1:

bkaradzic commented 5 years ago

Actually never mind I did something that made it appear to work. It's not working yet...

bkaradzic commented 5 years ago

Ok, now it builds.

typedef struct encoder_s encoder_t is required, I'll just fix that in header, no need for IDL to mess with it.

But function names with 2D, and 3D in name strip D out of it.

cloudwu commented 5 years ago

It's hard to split words by one pattern, because type name and func name use different camlcase.

So I convert func name to upper camlcase first, ant then we can use the pattern "[%u%d]+%l*" (number is considered as upper) . This can solve the name like createTexture2D .

bkaradzic commented 5 years ago

It works! :+1: :)