Change demo to showcase instancing.
This commit is contained in:
@@ -21,8 +21,9 @@ public:
|
||||
* If there is no instanced alpha mask and unique alpha mask is set
|
||||
* to nullptr, Then there is no alpha mask. - Redacted.
|
||||
*/
|
||||
~InstancedSprite() override;
|
||||
InstancedSprite(const Vector2& position, unsigned int layer, const std::string& instanced_texture_filesystem_path,
|
||||
float face_angle = 0.0f, const Color4& base_color = Colors::White, Texture* unique_alpha_mask = nullptr, const std::string& instanced_alpha_mask_filesystem_path = "")
|
||||
: texture_path(instanced_texture_filesystem_path), alpha_mask_path(instanced_alpha_mask_filesystem_path),
|
||||
Sprite(position, layer, face_angle, base_color, nullptr, unique_alpha_mask) {}
|
||||
: Sprite(position, layer, face_angle, base_color, nullptr, unique_alpha_mask), texture_path(instanced_texture_filesystem_path),
|
||||
alpha_mask_path(instanced_alpha_mask_filesystem_path) {}
|
||||
};
|
||||
|
@@ -34,8 +34,11 @@ public:
|
||||
[[nodiscard]] size_t EntityCount() const;
|
||||
[[nodiscard]] std::string GetName() const;
|
||||
[[nodiscard]] Camera* GetActiveCamera() const;
|
||||
[[nodiscard]] Texture* GetInstancedTexture(const InstancedSprite* user);
|
||||
[[nodiscard]] Texture* GetInstancedAlphaMask(const InstancedSprite* user);
|
||||
[[nodiscard]] InstancedTexture* GetInstancedTexture(const InstancedSprite* user);
|
||||
[[nodiscard]] InstancedTexture* GetInstancedAlphaMask(const InstancedSprite* user);
|
||||
void DestroyInstancedTexture(const InstancedTexture* itx);
|
||||
void DestroyInstancedAlphaMask(const InstancedTexture* alpha_mask);
|
||||
|
||||
public:
|
||||
void AppendEntity(Entity* entity);
|
||||
void AppendFixed(Fixed* fixed);
|
||||
|
Reference in New Issue
Block a user