81 lines
2.0 KiB
C++
81 lines
2.0 KiB
C++
/*
|
|
ZParticleRenderStrategy.h
|
|
Author: James Russell <jcrussell@762studios.com>
|
|
|
|
Purpose: TODO
|
|
|
|
Changelog
|
|
2011/08/28 - creation (jcrussell)
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifndef _ZPARTICLERENDERSTRATEGY_H
|
|
#define _ZPARTICLERENDERSTRATEGY_H
|
|
|
|
#include <ZUtil/ZUtil.hpp>
|
|
#include <ZRenderer/ZRenderer.hpp>
|
|
#include <ZRendererUtil/ZParticleStorageAllocator.h>
|
|
|
|
//Forward Declarations
|
|
class ZParticleEffect;
|
|
class ZParticleEmitter;
|
|
class ZParticleStorageAllocator;
|
|
|
|
class ZParticleRenderStrategy
|
|
{
|
|
public:
|
|
//Virtual Destructor
|
|
~ZParticleRenderStrategy() { }
|
|
|
|
/*
|
|
public ZParticleRenderStrategy::AllocateBuffers
|
|
|
|
Called when the particle render strategy needs to allocate buffers from the renderer
|
|
for particle data.
|
|
|
|
@param _maxParticles - the number of particles to allocate buffer space for
|
|
@param _renderer - the renderer to allocate buffers from
|
|
@return (void)
|
|
@context (all)
|
|
*/
|
|
virtual void AllocateBuffers(size_t _maxParticles, ZRenderer *_renderer) = 0;
|
|
|
|
/*
|
|
virtual public ZParticleRenderStrategy::CheckParticleFormat
|
|
|
|
Checks to see if this render strategy can render the provided particle format.
|
|
|
|
@param _format - string description of the particle format
|
|
@return (bool) - true if this render strategy can handle it, false otherwise
|
|
@context (all)
|
|
*/
|
|
virtual bool CheckParticleFormat(const ZString& _format) = 0;
|
|
|
|
/*
|
|
virtual public ZParticleUpdateStrategy::RenderParticles
|
|
|
|
Renders the particle data present in particle storage.
|
|
|
|
@param _particleEffect - the emitter's parent particle effect
|
|
@param _particleEmitter - the parent emitter
|
|
@param _storageAllocator - the particle data storage
|
|
@param _renderer - the renderer to render to
|
|
@param _frameContext - the frame context to render with
|
|
@return (void)
|
|
@context (all)
|
|
*/
|
|
virtual void RenderParticles(ZParticleEffect* _particleEffect,
|
|
ZParticleEmitter* _particleEmitter,
|
|
ZParticleStorageAllocator* _storageAllocator,
|
|
ZRenderer* _renderer,
|
|
ZFrameContext _frameContext,
|
|
const ZMatrix44f& _transform,
|
|
int _drawGroup
|
|
) = 0;
|
|
|
|
};
|
|
|
|
#endif
|
|
|