widberg / bgfx.cmake

https://github.com/bkaradzic/bgfx.cmake. Independently maintained CMake build scripts for bgfx. Released under public domain.
https://github.com/bkaradzic/bgfx.cmake
Creative Commons Zero v1.0 Universal
286 stars 254 forks source link

Improved a bit shaderc #14

Closed Synxis closed 6 years ago

Synxis commented 6 years ago

This PR adds two features:

  1. when invoking shaderc, the folder containing the output will be created (I was tired of creating the folder manually, since git does not retain empty folders).
  2. shaderc now accept a LABEL argument that is appended to the compilation message. It is very useful when a shader is compiled for several APIs for example, so instead of seeing:

    Compiling shader plop.vsh
    Compiling shader plop.vsh
    Compiling shader plop.vsh

    You can see:

    Compiling shader plop.vsh (DirectX11)
    Compiling shader plop.vsh (OpenGL2)
    Compiling shader plop.vsh (BananaRenderer)

    By default, not specifying LABEL will give the old behavior

And again, thanks for this repo !

JoshuaBrookover commented 6 years ago

Sorry, I totally missed this PR somehow! Let me look over it.