Skip to content

Commit 7aebd10

Browse files
authored
feat(webgl): add glslang to support webgl frontend reflection (#401)
1 parent 8409b6f commit 7aebd10

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+11514
-1085
lines changed

cmake/TransmuteClient.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,20 @@ set(NODE_ADDON_API_HEADERS_PATH ${CMAKE_SOURCE_DIR}/thirdparty/headers/node-addo
7373
target_include_directories(TransmuteClient PRIVATE ${NODE_ADDON_API_HEADERS_PATH})
7474
target_include_directories(TransmuteClientLibrary PRIVATE ${NODE_ADDON_API_HEADERS_PATH})
7575

76+
#
7677
# Link libraries
78+
#
79+
7780
tr_target_link_library(TransmuteClientLibrary ${TR_CRATE_BUILD_PATH} jsar_jsbindings STATIC)
7881
tr_target_link_thirdparty_library(TransmuteClientLibrary node)
7982
tr_target_link_skia_library(TransmuteClientLibrary)
8083

84+
# GLSLang libraries
85+
tr_target_link_thirdparty_library_with_path(TransmuteClientLibrary glslang glslang)
86+
tr_target_link_thirdparty_library_with_path(TransmuteClientLibrary glslang glslang-default-resource-limits)
87+
tr_target_link_thirdparty_library_with_path(TransmuteClientLibrary glslang MachineIndependent)
88+
tr_target_link_thirdparty_library_with_path(TransmuteClientLibrary glslang OSDependent)
89+
8190
if(APPLE)
8291
set(APPLE_CLIENT_DEPS
8392
"-framework Carbon"

cmake/TransmuteCommon.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ include_directories(
101101
${SKIA_HEADERS_PATH}/include
102102
)
103103

104+
# GLSLang headers
105+
set(GLSLANG_HEADERS_PATH ${CMAKE_SOURCE_DIR}/thirdparty/headers/glslang/include)
106+
include_directories(${GLSLANG_HEADERS_PATH})
107+
104108
# Add Unity headers
105109
set(UNITY_HEADERS_PATH ${CMAKE_SOURCE_DIR}/thirdparty/headers/Unity/include)
106110
include_directories(${UNITY_HEADERS_PATH})
@@ -132,6 +136,10 @@ function(tr_target_link_thirdparty_library TARGET LIBRARY_NAME)
132136
endif()
133137
endfunction()
134138

139+
function(tr_target_link_thirdparty_library_with_path TARGET LIBRARY_PATH LIBRARY_NAME)
140+
tr_target_link_library(${TARGET} ${TR_THIRDPARTY_PATH}/lib/${LIBRARY_PATH} ${LIBRARY_NAME} STATIC)
141+
endfunction()
142+
135143
function(tr_target_link_skia_library TARGET)
136144
tr_target_link_thirdparty_library(${TARGET} skia)
137145
tr_target_link_thirdparty_library(${TARGET} skparagraph)

src/client/graphics/webgl_active_info.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ namespace endor
2020
, type(info.type)
2121
{
2222
}
23+
WebGLActiveInfo(const std::string &name, int type, int size)
24+
: name(name)
25+
, size(size)
26+
, type(type)
27+
{
28+
}
2329

2430
public:
2531
std::string name;

0 commit comments

Comments
 (0)