diff options
Diffstat (limited to 'scene/resources/baked_light.h')
-rw-r--r-- | scene/resources/baked_light.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/scene/resources/baked_light.h b/scene/resources/baked_light.h index df86f98c08..942f6eab1a 100644 --- a/scene/resources/baked_light.h +++ b/scene/resources/baked_light.h @@ -33,7 +33,13 @@ private: RID baked_light; Mode mode; - Map<int,Ref<Texture> > lightmaps; + struct LightMap { + Size2i gen_size; + Ref<Texture> texture; + }; + + + Vector< LightMap> lightmaps; //bake vars int cell_subdiv; @@ -54,6 +60,13 @@ private: Array _get_lightmap_data() const; void _set_lightmap_data(Array p_array); + +protected: + + bool _set(const StringName& p_name, const Variant& p_value); + bool _get(const StringName& p_name,Variant &r_ret) const; + void _get_property_list( List<PropertyInfo> *p_list) const; + static void _bind_methods(); public: @@ -97,10 +110,13 @@ public: void set_octree(const DVector<uint8_t>& p_octree); DVector<uint8_t> get_octree() const; - void add_lightmap(const Ref<Texture> p_texture,int p_id); - void erase_lightmap(int p_id); - void get_lightmaps(List<int> *r_lightmaps); - Ref<Texture> get_lightmap_texture(int p_id); + void add_lightmap(const Ref<Texture> &p_texture,Size2 p_gen_size=Size2(256,256)); + void set_lightmap_gen_size(int p_idx,const Size2& p_size); + Size2 get_lightmap_gen_size(int p_idx) const; + void set_lightmap_texture(int p_idx,const Ref<Texture> &p_texture); + Ref<Texture> get_lightmap_texture(int p_idx) const; + void erase_lightmap(int p_idx); + int get_lightmaps_count() const; void clear_lightmaps(); virtual RID get_rid() const; |