mirror of https://github.com/godotengine/godot
Fix GCC 5 build after #26331 and cleanup style
Also cleanup after 01a3dd3.
This commit is contained in:
parent
caa42667e8
commit
0ba75c195e
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#include "core/os/os.h"
|
#include "core/os/os.h"
|
||||||
#include "core/variant_parser.h"
|
#include "core/variant_parser.h"
|
||||||
|
|
||||||
bool ResourceFormatImporter::SortImporterByName::operator()(const Ref<ResourceImporter> &p_a, const Ref<ResourceImporter> &p_b) const {
|
bool ResourceFormatImporter::SortImporterByName::operator()(const Ref<ResourceImporter> &p_a, const Ref<ResourceImporter> &p_b) const {
|
||||||
return p_a->get_importer_name() < p_b->get_importer_name();
|
return p_a->get_importer_name() < p_b->get_importer_name();
|
||||||
}
|
}
|
||||||
|
|
@ -321,7 +322,6 @@ Variant ResourceFormatImporter::get_resource_metadata(const String &p_path) cons
|
||||||
return pat.metadata;
|
return pat.metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ResourceFormatImporter::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) {
|
void ResourceFormatImporter::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) {
|
||||||
|
|
||||||
PathAndType pat;
|
PathAndType pat;
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,10 @@ public:
|
||||||
String get_internal_resource_path(const String &p_path) const;
|
String get_internal_resource_path(const String &p_path) const;
|
||||||
void get_internal_resource_path_list(const String &p_path, List<String> *r_paths);
|
void get_internal_resource_path_list(const String &p_path, List<String> *r_paths);
|
||||||
|
|
||||||
void add_importer(const Ref<ResourceImporter> &p_importer) { importers.push_back(p_importer); importers.sort_custom<SortImporterByName>();}
|
void add_importer(const Ref<ResourceImporter> &p_importer) {
|
||||||
|
importers.push_back(p_importer);
|
||||||
|
importers.sort_custom<SortImporterByName>();
|
||||||
|
}
|
||||||
void remove_importer(const Ref<ResourceImporter> &p_importer) { importers.erase(p_importer); }
|
void remove_importer(const Ref<ResourceImporter> &p_importer) { importers.erase(p_importer); }
|
||||||
Ref<ResourceImporter> get_importer_by_name(const String &p_name) const;
|
Ref<ResourceImporter> get_importer_by_name(const String &p_name) const;
|
||||||
Ref<ResourceImporter> get_importer_by_extension(const String &p_extension) const;
|
Ref<ResourceImporter> get_importer_by_extension(const String &p_extension) const;
|
||||||
|
|
@ -120,7 +123,6 @@ public:
|
||||||
virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL) = 0;
|
virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL) = 0;
|
||||||
virtual bool are_import_settings_valid(const String &p_path) const { return true; }
|
virtual bool are_import_settings_valid(const String &p_path) const { return true; }
|
||||||
virtual String get_import_settings_string() const { return String(); }
|
virtual String get_import_settings_string() const { return String(); }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // RESOURCE_IMPORTER_H
|
#endif // RESOURCE_IMPORTER_H
|
||||||
|
|
|
||||||
|
|
@ -1054,7 +1054,6 @@ void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p
|
||||||
physics_frame_time = p_physics_frame_time;
|
physics_frame_time = p_physics_frame_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
|
ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
|
||||||
|
|
||||||
ScriptDebuggerRemote::ScriptDebuggerRemote() :
|
ScriptDebuggerRemote::ScriptDebuggerRemote() :
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,6 @@
|
||||||
#define glClearDepth glClearDepthf
|
#define glClearDepth glClearDepthf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _DEPTH_COMPONENT24_OES 0x81A6
|
|
||||||
|
|
||||||
static const GLenum _cube_side_enum[6] = {
|
static const GLenum _cube_side_enum[6] = {
|
||||||
|
|
||||||
GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
|
GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
|
||||||
|
|
@ -569,7 +567,7 @@ bool RasterizerSceneGLES2::reflection_probe_instance_begin_render(RID p_instance
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, rpi->fbo[i]);
|
glBindFramebuffer(GL_FRAMEBUFFER, rpi->fbo[i]);
|
||||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, _cube_side_enum[i], rpi->cubemap, 0);
|
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, _cube_side_enum[i], rpi->cubemap, 0);
|
||||||
glBindRenderbuffer(GL_RENDERBUFFER, rpi->depth);
|
glBindRenderbuffer(GL_RENDERBUFFER, rpi->depth);
|
||||||
glRenderbufferStorage(GL_RENDERBUFFER, _DEPTH_COMPONENT24_OES, size, size);
|
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, size, size); // Note: used to be _DEPTH_COMPONENT24_OES. GL_DEPTH_COMPONENT untested.
|
||||||
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rpi->depth);
|
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rpi->depth);
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,6 @@ GLuint RasterizerStorageGLES2::system_fbo = 0;
|
||||||
|
|
||||||
#define _EXT_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
|
#define _EXT_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
|
||||||
|
|
||||||
#define _DEPTH_COMPONENT24_OES 0x81A6
|
|
||||||
|
|
||||||
#define _RED_OES 0x1903
|
#define _RED_OES 0x1903
|
||||||
|
|
||||||
void RasterizerStorageGLES2::bind_quad_array() const {
|
void RasterizerStorageGLES2::bind_quad_array() const {
|
||||||
|
|
|
||||||
|
|
@ -660,7 +660,6 @@ VERTEX_SHADER_CODE
|
||||||
#if defined(RENDER_DEPTH) && defined(USE_RGBA_SHADOWS)
|
#if defined(RENDER_DEPTH) && defined(USE_RGBA_SHADOWS)
|
||||||
position_interp = gl_Position;
|
position_interp = gl_Position;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
|
|
@ -1358,12 +1357,9 @@ LIGHT_SHADER_CODE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define SAMPLE_SHADOW_TEXEL(p_shadow, p_pos, p_depth) step(p_depth, SHADOW_DEPTH(texture2D(p_shadow, p_pos)))
|
#define SAMPLE_SHADOW_TEXEL(p_shadow, p_pos, p_depth) step(p_depth, SHADOW_DEPTH(texture2D(p_shadow, p_pos)))
|
||||||
#define SAMPLE_SHADOW_TEXEL_PROJ(p_shadow, p_pos) step(p_pos.z, SHADOW_DEPTH(texture2DProj(p_shadow, p_pos)))
|
#define SAMPLE_SHADOW_TEXEL_PROJ(p_shadow, p_pos) step(p_pos.z, SHADOW_DEPTH(texture2DProj(p_shadow, p_pos)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
float sample_shadow(highp sampler2D shadow, highp vec4 spos) {
|
float sample_shadow(highp sampler2D shadow, highp vec4 spos) {
|
||||||
|
|
||||||
#ifdef SHADOW_MODE_PCF_13
|
#ifdef SHADOW_MODE_PCF_13
|
||||||
|
|
|
||||||
|
|
@ -427,7 +427,7 @@ ImageTexture::ImageTexture() {
|
||||||
storage = STORAGE_RAW;
|
storage = STORAGE_RAW;
|
||||||
lossy_storage_quality = 0.7;
|
lossy_storage_quality = 0.7;
|
||||||
image_stored = false;
|
image_stored = false;
|
||||||
format = Image::Format::FORMAT_L8;
|
format = Image::FORMAT_L8;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageTexture::~ImageTexture() {
|
ImageTexture::~ImageTexture() {
|
||||||
|
|
@ -1516,7 +1516,7 @@ CubeMap::CubeMap() {
|
||||||
cubemap = VisualServer::get_singleton()->texture_create();
|
cubemap = VisualServer::get_singleton()->texture_create();
|
||||||
storage = STORAGE_RAW;
|
storage = STORAGE_RAW;
|
||||||
lossy_storage_quality = 0.7;
|
lossy_storage_quality = 0.7;
|
||||||
format = Image::Format::FORMAT_BPTC_RGBA;
|
format = Image::FORMAT_BPTC_RGBA;
|
||||||
}
|
}
|
||||||
|
|
||||||
CubeMap::~CubeMap() {
|
CubeMap::~CubeMap() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue