BVB Source Codes

CRYENGINE Show FeatureRenderGpuSprites.h Source code

Return Download CRYENGINE: download FeatureRenderGpuSprites.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. // -------------------------------------------------------------------------
  4. //  Created:     09/04/2015 by Benjamin Block
  5. //  Description:
  6. // -------------------------------------------------------------------------
  7. //
  8. ////////////////////////////////////////////////////////////////////////////
  9.  
  10. #pragma once
  11.  
  12. #include "StdAfx.h"
  13. #include "ParticleSystem/ParticleRender.h"
  14. #include <CryCore/BitFiddling.h>
  15.  
  16. CRY_PFX2_DBG
  17.  
  18. namespace pfx2
  19. {
  20.  
  21. SERIALIZATION_DECLARE_ENUM(EGpuSpritesSortMode,
  22.                            None = 0,
  23.                            BackToFront,
  24.                            FrontToBack,
  25.                            OldToNew,
  26.                            NewToOld
  27.                            );
  28.  
  29. SERIALIZATION_DECLARE_ENUM(EGpuSpritesFacingMode,
  30.                            Screen = 0,
  31.                            Velocity
  32.                            );
  33.  
  34. // maybe inherit from CParticleRenderBase to inherit some of the
  35. // draw call logic already in place if that makes sense.
  36. class CFeatureRenderGpuSprites : public CParticleRenderBase
  37. {
  38. public:
  39.         struct ConvertNextPowerOfTwo
  40.         {
  41.                 typedef uint TType;
  42.                 static TType From(TType val) { return NextPower2(val); }
  43.                 static TType To(TType val)   { return NextPower2(val); }
  44.         };
  45.         typedef TValue<uint, THardLimits<1024, 1024*1024>, ConvertNextPowerOfTwo> UIntNextPowerOfTwo;
  46.  
  47.         CRY_PFX2_DECLARE_FEATURE
  48.  
  49.         CFeatureRenderGpuSprites();
  50.  
  51.         virtual void         ResolveDependency(CParticleComponent* pComponent) override;
  52.         virtual void         Serialize(Serialization::IArchive& ar) override;
  53.         virtual EFeatureType GetFeatureType() override { return EFT_Render; }
  54.         virtual void         AddToComponent(CParticleComponent* pComponent, SComponentParams* pParams) override;
  55. private:
  56.         UIntNextPowerOfTwo    m_maxParticles;
  57.         UIntNextPowerOfTwo    m_maxNewBorns;
  58.         EGpuSpritesSortMode   m_sortMode;
  59.         EGpuSpritesFacingMode m_facingMode;
  60.         UFloat10              m_axisScale;
  61.         SFloat                m_sortBias;
  62. };
  63. }
  64.  
downloadFeatureRenderGpuSprites.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top