Plasma Engine
2.0
Loading...
Searching...
No Matches
ParticleRenderer.h
1
#pragma once
2
3
#include <Foundation/Math/Color16f.h>
4
#include <ParticlePlugin/ParticlePluginDLL.h>
5
#include <RendererCore/Meshes/MeshRenderer.h>
6
#include <RendererCore/Shader/ConstantBufferStorage.h>
7
#include <RendererCore/Shader/ShaderResource.h>
8
#include <RendererCore/Textures/Texture2DResource.h>
9
10
#include <RendererCore/../../../Data/Base/Shaders/Particles/ParticleSystemConstants.h>
11
12
class
plRenderContext
;
13
15
class
PL_PARTICLEPLUGIN_DLL
plParticleRenderer
:
public
plRenderer
16
{
17
PL_ADD_DYNAMIC_REFLECTION(
plParticleRenderer
,
plRenderer
);
18
PL_DISALLOW_COPY_AND_ASSIGN(
plParticleRenderer
);
19
20
public
:
21
plParticleRenderer
();
22
~plParticleRenderer
();
23
24
virtual
void
GetSupportedRenderDataCategories(
plHybridArray<plRenderData::Category, 8>
& ref_categories)
const override
;
25
26
protected
:
27
struct
TempSystemCB
28
{
29
TempSystemCB
(
plRenderContext
* pRenderContext);
30
~TempSystemCB
();
31
32
void
SetGenericData(
bool
bApplyObjectTransform,
const
plTransform
& objectTransform,
plTime
effectLifeTime, plUInt8 uiNumVariationsX, plUInt8 uiNumVariationsY, plUInt8 uiNumFlipbookAnimsX, plUInt8 uiNumFlipbookAnimsY,
float
fDistortionStrength = 0,
float
fNormalCurvature = 0,
float
fLightDirectionality = 0);
33
void
SetTrailData(
float
fSnapshotFraction, plInt32 iNumUsedTrailPoints);
34
35
plConstantBufferStorage<plParticleSystemConstants>
* m_pConstants;
36
plConstantBufferStorageHandle
m_hConstantBuffer;
37
};
38
39
void
CreateParticleDataBuffer(
plGALBufferHandle
& inout_hBuffer, plUInt32 uiDataTypeSize, plUInt32 uiNumParticlesPerBatch);
40
void
DestroyParticleDataBuffer(
plGALBufferHandle
& inout_hBuffer);
41
void
BindParticleShader(
plRenderContext
* pRenderContext,
const
char
* szShader)
const
;
42
43
protected
:
44
plShaderResourceHandle
m_hShader;
45
};
plConstantBufferStorageHandle
Definition
ConstantBufferStorage.h:54
plConstantBufferStorage
Definition
ConstantBufferStorage.h:34
plGALBufferHandle
Definition
RendererFoundationDLL.h:418
plHybridArray
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition
HybridArray.h:12
plParticleRenderer
Implements rendering of particle systems.
Definition
ParticleRenderer.h:16
plRenderContext
Definition
RenderContext.h:30
plRenderer
This is the base class for types that handle rendering of different object types.
Definition
Renderer.h:9
plTransformTemplate< float >
plTypedResourceHandle< class plShaderResource >
plParticleRenderer::TempSystemCB
Definition
ParticleRenderer.h:28
plTime
The time class encapsulates a double value storing the time in seconds.
Definition
Time.h:12
Code
EnginePlugins
ParticlePlugin
Renderer
ParticleRenderer.h
Generated by
1.11.0