/* ZStandardParticleRenderStrategy.h Author: James Russell Purpose: TODO Changelog 2011/09/11 - creation (jcrussell) */ #pragma once #ifndef _ZSTANDARDPARTICLERENDERSTRATEGY_H #define _ZSTANDARDPARTICLERENDERSTRATEGY_H #include #include class ZStandardParticleRenderStrategy : public ZParticleRenderStrategy { protected: //Vertex buffer ZPtr VertexBuffer; //Index buffer ZPtr IndexBuffer; //Material we use ZPtr ParticleMaterial; //Texture we'll be using ZPtr ParticleTexture; //Our render state ZRenderState RenderState; //Our UV coordinates (per vertex) float UVs[8]; public: /* Constructor. @param _maxParticles - maximum number of particles we will use @param _renderer - the renderer instance */ ZStandardParticleRenderStrategy(); /* Destructor. */ ~ZStandardParticleRenderStrategy(); /* public ZStandardParticleRenderStrategy::SetParticleTexture TODO @param _texture - @return (void) @context (all) */ void SetParticleTexture(ZPtr _texture); /* public ZStandardParticleRenderStrategy::SetParticleTextureUVs TODO @param _uvs - uv coordinate array (size 8) @return (void) @context (all) */ void SetParticleTextureUVs(float *_uvs); /* public ZStandardParticleRenderStrategy::SetRenderState TODO @param _state - @return (void) @context (all) */ void SetRenderState(ZRenderState _state); //Subclass Override void AllocateBuffers(size_t _maxParticles, ZRenderer *_renderer); //Subclass Override virtual bool CheckParticleFormat( const ZString& _format ); //Subclass Override virtual void RenderParticles(ZParticleEffect* _particleEffect, ZParticleEmitter* _particleEmitter, ZParticleStorageAllocator* _storageAllocator, ZRenderer* _renderer, ZFrameContext _frameContext, const ZMatrix44f& _transform, int _drawGroup ); }; #endif