summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/basis_universal/register_types.cpp11
-rw-r--r--modules/glslang/SCsub6
2 files changed, 8 insertions, 9 deletions
diff --git a/modules/basis_universal/register_types.cpp b/modules/basis_universal/register_types.cpp
index 13f4d5fc48..062b5b59f8 100644
--- a/modules/basis_universal/register_types.cpp
+++ b/modules/basis_universal/register_types.cpp
@@ -52,12 +52,11 @@ enum BasisDecompressFormat {
basist::etc1_global_selector_codebook *sel_codebook = nullptr;
+#ifdef TOOLS_ENABLED
static Vector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Image::UsedChannels p_channels) {
Vector<uint8_t> budata;
-#ifdef TOOLS_ENABLED
-
{
Ref<Image> image = p_image->duplicate();
@@ -117,14 +116,10 @@ static Vector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Image::
#ifdef USE_RG_AS_RGBA
image->convert_rg_to_ra_rgba8();
decompress_format = BASIS_DECOMPRESS_RG_AS_RA;
-
#else
-
params.m_seperate_rg_to_color_alpha = true;
decompress_format = BASIS_DECOMPRESS_RG;
-
#endif
-
} break;
case Image::USED_CHANNELS_RGB: {
decompress_format = BASIS_DECOMPRESS_RGB;
@@ -152,9 +147,9 @@ static Vector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Image::
}
}
-#endif
return budata;
}
+#endif // TOOLS_ENABLED
static Ref<Image> basis_universal_unpacker(const Vector<uint8_t> &p_buffer) {
Ref<Image> image;
@@ -286,7 +281,7 @@ void unregister_basis_universal_types() {
#ifdef TOOLS_ENABLED
delete sel_codebook;
-#endif
Image::basis_universal_packer = NULL;
+#endif
Image::basis_universal_unpacker = NULL;
}
diff --git a/modules/glslang/SCsub b/modules/glslang/SCsub
index 8c9445436e..ae102238f2 100644
--- a/modules/glslang/SCsub
+++ b/modules/glslang/SCsub
@@ -58,7 +58,11 @@ if env['builtin_glslang']:
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
- env_glslang.Prepend(CPPPATH=[thirdparty_dir])
+ # Treat glslang headers as system headers to avoid raising warnings. Not supported on MSVC.
+ if not env.msvc:
+ env_glslang.Append(CPPFLAGS=['-isystem', Dir(thirdparty_dir).path])
+ else:
+ env_glslang.Prepend(CPPPATH=[thirdparty_dir])
env_thirdparty = env_glslang.Clone()
env_thirdparty.disable_warnings()