diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-06-21 16:25:45 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-06-21 16:26:26 -0300 |
commit | 95560e02c5eed3561996ed2b1d1e47e26e8bb81c (patch) | |
tree | 8e53927435484e10e444e6e2f745b2ddc19029e6 /servers/visual/rasterizer.h | |
parent | 3c1fd26bb0c2e97b927343e5488aa6d646e2e27c (diff) | |
download | redot-engine-95560e02c5eed3561996ed2b1d1e47e26e8bb81c.tar.gz |
2D GPU Particles working..
Diffstat (limited to 'servers/visual/rasterizer.h')
-rw-r--r-- | servers/visual/rasterizer.h | 20 |
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); |