mirror of
https://github.com/godotengine/godot.git
synced 2025-01-18 20:40:57 +08:00
Fix macOS and iOS defines in the rendering code.
This commit is contained in:
parent
660828e771
commit
e7464e7a30
@ -64,7 +64,7 @@ Config::Config() {
|
||||
#else
|
||||
float_texture_supported = extensions.has("GL_ARB_texture_float") || extensions.has("GL_OES_texture_float");
|
||||
etc2_supported = true;
|
||||
#if defined(ANDROID_ENABLED) || defined(IPHONE_ENABLED)
|
||||
#if defined(ANDROID_ENABLED) || defined(IOS_ENABLED)
|
||||
// Some Android devices report support for S3TC but we don't expect that and don't export the textures.
|
||||
// This could be fixed but so few devices support it that it doesn't seem useful (and makes bigger APKs).
|
||||
// For good measure we do the same hack for iOS, just in case.
|
||||
|
@ -500,7 +500,7 @@ Fog::VolumetricFog::VolumetricFog(const Vector3i &fog_size, RID p_sky_shader) {
|
||||
fog_map = RD::get_singleton()->texture_create(tf, RD::TextureView());
|
||||
RD::get_singleton()->set_resource_name(fog_map, "Fog map");
|
||||
|
||||
#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
|
||||
#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
|
||||
Vector<uint8_t> dm;
|
||||
dm.resize(fog_size.x * fog_size.y * fog_size.z * 4);
|
||||
dm.fill(0);
|
||||
@ -643,7 +643,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
|
||||
|
||||
{
|
||||
RD::Uniform u;
|
||||
#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
|
||||
#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
|
||||
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
|
||||
#else
|
||||
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
|
||||
@ -663,7 +663,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
|
||||
|
||||
{
|
||||
RD::Uniform u;
|
||||
#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
|
||||
#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
|
||||
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
|
||||
#else
|
||||
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
|
||||
@ -675,7 +675,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
|
||||
|
||||
{
|
||||
RD::Uniform u;
|
||||
#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
|
||||
#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
|
||||
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
|
||||
#else
|
||||
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
|
||||
@ -949,7 +949,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
|
||||
}
|
||||
{
|
||||
RD::Uniform u;
|
||||
#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
|
||||
#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
|
||||
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
|
||||
#else
|
||||
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
|
||||
@ -960,7 +960,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
|
||||
}
|
||||
{
|
||||
RD::Uniform u;
|
||||
#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
|
||||
#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
|
||||
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
|
||||
#else
|
||||
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
|
||||
@ -972,7 +972,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
|
||||
|
||||
{
|
||||
RD::Uniform u;
|
||||
#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
|
||||
#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
|
||||
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
|
||||
#else
|
||||
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
|
||||
|
@ -290,7 +290,7 @@ bool Utilities::has_os_feature(const String &p_feature) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !defined(ANDROID_ENABLED) && !defined(IPHONE_ENABLED)
|
||||
#if !defined(ANDROID_ENABLED) && !defined(IOS_ENABLED)
|
||||
// Some Android devices report support for S3TC but we don't expect that and don't export the textures.
|
||||
// This could be fixed but so few devices support it that it doesn't seem useful (and makes bigger APKs).
|
||||
// For good measure we do the same hack for iOS, just in case.
|
||||
|
Loading…
Reference in New Issue
Block a user