Add a new HashSet template
* Intended to replace RBSet in most cases. * Optimized for iteration speed
This commit is contained in:
parent
410893ad0f
commit
45af29da80
243 changed files with 1400 additions and 662 deletions
|
|
@ -34,7 +34,7 @@
|
|||
#ifdef GLES3_ENABLED
|
||||
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/templates/rb_set.h"
|
||||
#include "core/templates/hash_set.h"
|
||||
|
||||
// This must come first to avoid windows.h mess
|
||||
#include "platform_config.h"
|
||||
|
|
@ -65,7 +65,7 @@ public:
|
|||
// TODO implement wireframe in OpenGL
|
||||
// bool generate_wireframes;
|
||||
|
||||
RBSet<String> extensions;
|
||||
HashSet<String> extensions;
|
||||
|
||||
bool float_texture_supported = false;
|
||||
bool s3tc_supported = false;
|
||||
|
|
|
|||
|
|
@ -2381,7 +2381,7 @@ void MaterialStorage::shader_free(RID p_rid) {
|
|||
|
||||
//make material unreference this
|
||||
while (shader->owners.size()) {
|
||||
material_set_shader(shader->owners.front()->get()->self, RID());
|
||||
material_set_shader((*shader->owners.begin())->self, RID());
|
||||
}
|
||||
|
||||
//clear data if exists
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ struct Shader {
|
|||
String code;
|
||||
RS::ShaderMode mode;
|
||||
HashMap<StringName, HashMap<int, RID>> default_texture_parameter;
|
||||
RBSet<Material *> owners;
|
||||
HashSet<Material *> owners;
|
||||
};
|
||||
|
||||
/* Material structs */
|
||||
|
|
@ -384,7 +384,7 @@ struct GlobalVariables {
|
|||
BUFFER_DIRTY_REGION_SIZE = 1024
|
||||
};
|
||||
struct Variable {
|
||||
RBSet<RID> texture_materials; // materials using this
|
||||
HashSet<RID> texture_materials; // materials using this
|
||||
|
||||
RS::GlobalVariableType type;
|
||||
Variant value;
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ struct Mesh {
|
|||
List<MeshInstance *> instances;
|
||||
|
||||
RID shadow_mesh;
|
||||
RBSet<Mesh *> shadow_owners;
|
||||
HashSet<Mesh *> shadow_owners;
|
||||
|
||||
RendererStorage::Dependency dependency;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue