summaryrefslogtreecommitdiff
path: root/scene/resources/baked_light.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-08-01 22:10:38 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-08-01 22:10:38 -0300
commit678948068bbde7f12a9c5f28a467b6cf4d127851 (patch)
tree75572f3a5cc6089a6ca3046e9307d0a7c0b72c51 /scene/resources/baked_light.h
parent9ff6d55822647c87eef392147ea15641d0922d47 (diff)
Small Issues & Maintenance
-=-=-=-=-=-=-=-=-=-=-=-=-= -Begin work on Navigation Meshes (simple pathfinding for now, will improve soon) -More doc on theme overriding -Upgraded OpenSSL to version without bugs -Misc bugfixes
Diffstat (limited to 'scene/resources/baked_light.h')
-rw-r--r--scene/resources/baked_light.h26
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;