18 #include "precompiled.h"
96 for (
size_t i = 0; i <
m->
emitters.size(); ++i)
107 g_Renderer.GetViewCamera().m_Orientation.GetInverse(worldToCam);
120 shader->GetShader()->Uniform(str_transform,
g_Renderer.GetViewCamera().GetViewProjection());
126 for (
size_t i = 0; i <
m->
emitters.size(); ++i)
130 emitter->
Bind(shader->GetShader());
136 pglBlendEquationEXT(GL_FUNC_ADD);
137 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
147 for (
size_t i = 0; i <
m->
emitters.size(); ++i)
void RenderBounds(CShaderProgramPtr &shader)
Render bounding boxes for all the submitted emitters.
void UpdateArrayData()
Update particle and vertex array data.
void RenderParticles(bool solidColor=false)
Render all the submitted particles.
void EndFrame()
Reset the list of submitted overlays.
CShaderTechniquePtr shader
CVector3D Transform(const CVector3D &vector) const
shared_ptr< CShaderTechnique > CShaderTechniquePtr
SortEmitterDistance(const CMatrix3D &m)
void RenderArray(const CShaderProgramPtr &shader)
Draw the vertex array.
CShaderTechniquePtr shaderSolid
std::vector< CParticleEmitter * > emitters
void Bind(const CShaderProgramPtr &shader)
Bind rendering state (textures and blend modes).
void PrepareForRendering(const CShaderDefines &context)
Prepare internal data structures for rendering.
CBoundingBoxAligned GetParticleBounds()
Get the bounding box of the center points of particles at their current positions.
void Submit(CParticleEmitter *emitter)
Add an emitter for rendering in this frame.
Represents a mapping of name strings to value strings, for use with #if and #ifdef and similar condit...
ParticleRendererInternals * m
float LengthSquared() const
static void Unbind()
Unbind any currently-bound buffer, so glVertexPointer etc calls will not attempt to use it...
CVector3D GetPosition() const
void Render(CShaderProgramPtr &shader) const
Render: Render the surfaces of the bound object as triangles.
shared_ptr< CShaderProgram > CShaderProgramPtr
bool operator()(CParticleEmitter *const &a, CParticleEmitter *const &b)
CParticleEmitterTypePtr m_Type