Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Core/GameEngine/Include/GameClient/ParticleSys.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ class ParticleSystemTemplate : public MemoryPoolObject, protected ParticleSystem
public:
ParticleSystemTemplate( const AsciiString &name );

AsciiString getName() const { return m_name; }
const AsciiString& getName() const { return m_name; }

// This function was made const because of update modules' module data being all const.
ParticleSystem *createSlaveSystem( Bool createSlaves = TRUE ) const ; ///< if returns non-null, it is a slave system for use
Expand Down Expand Up @@ -602,7 +602,7 @@ class ParticleSystem : public MemoryPoolObject,

void setInitialDelay( UnsignedInt delay ) { m_delayLeft = delay; }

AsciiString getParticleTypeName() { return m_particleTypeName; } ///< return the name of the particles
const AsciiString& getParticleTypeName() const { return m_particleTypeName; } ///< return the name of the particles
Bool isUsingDrawables() { return (m_particleType == DRAWABLE) ? true : false; }
Bool isUsingStreak() { return (m_particleType == STREAK) ? true : false; }
Bool isUsingSmudge() { return (m_particleType == SMUDGE) ? true : false; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,20 @@ class W3DParticleSystemManager : public ParticleSystemManager
virtual Int getOnScreenParticleCount() override { return m_onScreenParticleCount; }

private:
void initializeBatch(ParticleSystem* system, RefCountPtr<TextureClass>& texture);
void flushParticleBatch(RenderInfoClass& rinfo, UnsignedInt& pointCount);

enum { MAX_POINTS_PER_GROUP = 512 };

RefCountPtr<TextureClass> m_batchTexture; ///< the texture used as the drawing surface for batched particle draws
PointGroupClass *m_pointGroup; ///< the point group that contains all of the particles
StreakLineClass *m_streakLine; ///< the streak class that contains all of the streaks
ShareBufferClass<Vector3> *m_posBuffer; ///< array of particle positions
ShareBufferClass<Vector4> *m_RGBABuffer; ///< array of particle color and alpha
ShareBufferClass<float> *m_sizeBuffer; ///< array of particle sizes
ShareBufferClass<uint8> *m_angleBuffer; ///< array of particle orientations

ParticleSystemInfo::ParticleShaderType m_batchShaderType;
Bool m_readyToRender; ///< if true, it is OK to render
Bool m_batchBillboard;
};
Loading
Loading