Re: D Vulkan API

2016-03-02 Thread karabuta via Digitalmars-d

On Tuesday, 1 March 2016 at 11:33:26 UTC, Nicholas Wilson wrote:
So i've spent the last few days making more D feeling bindings 
for vulkan, based off Satoshi's because going strait  from the 
spec was a PITA and very inconsistent, and they're almost done.


I would like to request some feedback on the code itself as 
well as the generated code and general feel of the interface 
for a an article/blog post on meta-programming and text 
processing in D. (I know I should replace most of those c-style 
for loops with join(er),but some of the ones dealing with 
arrays are quite complicated, and I really ought to factor out 
a lot of code). Also I just realised that all the extension 
functions will have to be called through obtained function 
pointers.




Just one non-technical thing, the module naming does not follow 
the D style. This is common is some few projects and makes things 
inconsistent :)


*** Modules
Module and package names should be all lowercase, and only 
contain the characters [a..z][0..9][_]. This avoids problems when 
dealing with case-insensitive file systems. ***




Code: http://dpaste.dzfl.pl/3146cdf9d382
outputted code http://dpaste.dzfl.pl/811796605755
Satoshi's bindings: 
https://github.com/Rikarin/VulkanizeD/blob/master/Vulkan.d


Nic





D Vulkan API

2016-03-01 Thread Nicholas Wilson via Digitalmars-d
So i've spent the last few days making more D feeling bindings 
for vulkan, based off Satoshi's because going strait  from the 
spec was a PITA and very inconsistent, and they're almost done.


I would like to request some feedback on the code itself as well 
as the generated code and general feel of the interface for a an 
article/blog post on meta-programming and text processing in D. 
(I know I should replace most of those c-style for loops with 
join(er),but some of the ones dealing with arrays are quite 
complicated, and I really ought to factor out a lot of code). 
Also I just realised that all the extension functions will have 
to be called through obtained function pointers.


I think i've covered most of the functions but if there are any 
that I have missed please tell me.


Many thanks to Adam and others for answering my questions so one 
more. Is it possible to get Fields/Parameters to return aliased 
types? Because currently all the flags are uints not e.g. 
ImageCreateFlags.(This would enable the removal of a very large 
amount of hackery)


Code: http://dpaste.dzfl.pl/3146cdf9d382
outputted code http://dpaste.dzfl.pl/811796605755
Satoshi's bindings: 
https://github.com/Rikarin/VulkanizeD/blob/master/Vulkan.d


Nic