summaryrefslogtreecommitdiffstats
path: root/servers/visual/rasterizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual/rasterizer.h')
-rw-r--r--servers/visual/rasterizer.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 07d6542b62..43452b714c 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -612,6 +612,7 @@ public:
TYPE_POLYGON,
TYPE_MESH,
TYPE_MULTIMESH,
+ TYPE_PARTICLES,
TYPE_CIRCLE,
TYPE_TRANSFORM,
TYPE_CLIP_IGNORE,
@@ -707,6 +708,16 @@ public:
CommandMultiMesh() { type = TYPE_MULTIMESH; }
};
+ struct CommandParticles : public Command {
+
+ RID particles;
+ RID texture;
+ RID normal_map;
+ int h_frames;
+ int v_frames;
+ CommandParticles() { type = TYPE_PARTICLES; }
+ };
+
struct CommandCircle : public Command {
Point2 pos;
@@ -845,6 +856,15 @@ public:
r = Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y);
} break;
+ case Item::Command::TYPE_PARTICLES: {
+
+ const Item::CommandParticles *particles_cmd = static_cast<const Item::CommandParticles *>(c);
+ if (particles_cmd->particles.is_valid()) {
+ Rect3 aabb = RasterizerStorage::base_singleton->particles_get_aabb(particles_cmd->particles);
+ r = Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y);
+ }
+
+ } break;
case Item::Command::TYPE_CIRCLE: {
const Item::CommandCircle *circle = static_cast<const Item::CommandCircle *>(c);