summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-05-19 05:50:06 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-05-19 05:50:06 +0200
commita4870b515381b222f5dcb9d4d3cfe34102967ce4 (patch)
tree26c21db43a47635ca28594153bd5640f95ebcf62 /src
parentf5a7dc9d264c4231d9f688704ceef6971bddf272 (diff)
add selecting and placing vobj's
TODO: - saving to disk - inspect dialog - actual lightmap shader
Diffstat (limited to 'src')
-rw-r--r--src/chunk-scenery.cpp2
-rw-r--r--src/light.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/chunk-scenery.cpp b/src/chunk-scenery.cpp
index a2a61907..d12a754b 100644
--- a/src/chunk-scenery.cpp
+++ b/src/chunk-scenery.cpp
@@ -139,7 +139,7 @@ auto chunk::ensure_scenery_mesh(scenery_scratch_buffers buffers) noexcept -> sce
const auto count = fm_begin(
size_t ret = 0;
for (const auto& e : _entities)
- ret += !e->is_dynamic() && !e->is_virtual();
+ ret += !e->is_dynamic();
return ret;
);
diff --git a/src/light.cpp b/src/light.cpp
index e1dd00b9..921b0e4d 100644
--- a/src/light.cpp
+++ b/src/light.cpp
@@ -1,11 +1,14 @@
#include "light.hpp"
#include "shaders/shader.hpp"
+#include "loader/loader.hpp"
+#include "loader/vobj-info.hpp"
#include <cmath>
namespace floormat {
light_proto::light_proto()
{
+ atlas = loader.vobj("light"_s).atlas;
pass = pass_mode::pass;
type = entity_type::light;
}
@@ -30,6 +33,7 @@ float light::depth_offset() const
}
Vector2 light::ordinal_offset(Vector2b) const { return {}; }
+
entity_type light::type() const noexcept { return entity_type::light; }
bool light::update(size_t, float) { return false; }
bool light::is_virtual() const { return true; }