Add C interface glslang::Version counterpart and version getter function
This commit is contained in:
parent
ebbd65501d
commit
42260d1f6d
2 changed files with 17 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "StandAlone/DirStackFileIncluder.h"
|
||||
#include "glslang/Public/ResourceLimits.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
#include "glslang/Include/ShHandle.h"
|
||||
|
||||
#include "glslang/Include/ResourceLimits.h"
|
||||
|
|
@ -54,6 +55,7 @@ static_assert(int(GLSLANG_REFLECTION_COUNT) == EShReflectionCount, "");
|
|||
static_assert(int(GLSLANG_PROFILE_COUNT) == EProfileCount, "");
|
||||
static_assert(sizeof(glslang_limits_t) == sizeof(TLimits), "");
|
||||
static_assert(sizeof(glslang_resource_t) == sizeof(TBuiltInResource), "");
|
||||
static_assert(sizeof(glslang_version_t) == sizeof(glslang::Version), "");
|
||||
|
||||
typedef struct glslang_shader_s {
|
||||
glslang::TShader* shader;
|
||||
|
|
@ -141,6 +143,11 @@ private:
|
|||
void* context;
|
||||
};
|
||||
|
||||
GLSLANG_EXPORT void glslang_get_version(glslang_version_t* version)
|
||||
{
|
||||
*reinterpret_cast<glslang::Version*>(version) = glslang::GetVersion();
|
||||
}
|
||||
|
||||
GLSLANG_EXPORT int glslang_initialize_process() { return static_cast<int>(glslang::InitializeProcess()); }
|
||||
|
||||
GLSLANG_EXPORT void glslang_finalize_process() { glslang::FinalizeProcess(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue