Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
PatchRData.cpp File Reference
#include "precompiled.h"
#include "renderer/PatchRData.h"
#include "graphics/Camera.h"
#include "graphics/Color.h"
#include "graphics/GameView.h"
#include "graphics/Material.h"
#include "graphics/MiniPatch.h"
#include "graphics/Patch.h"
#include "graphics/ShaderDefines.h"
#include "graphics/ShaderManager.h"
#include "graphics/ShaderTechnique.h"
#include "graphics/ShaderTechniquePtr.h"
#include "graphics/Terrain.h"
#include "graphics/TerrainTextureEntry.h"
#include "graphics/TerrainTextureManager.h"
#include "graphics/TextRenderer.h"
#include "graphics/TextureManager.h"
#include "lib/alignment.h"
#include "lib/code_generation.h"
#include "lib/debug.h"
#include "maths/Matrix3D.h"
#include "ps/CLogger.h"
#include "ps/CStr.h"
#include "ps/CStrIntern.h"
#include "ps/CStrInternStatic.h"
#include "ps/Game.h"
#include "ps/memory/AllocatorAdapter.h"
#include "ps/memory/LinearAllocator.h"
#include "ps/Profile.h"
#include "renderer/AlphaMapCalculator.h"
#include "renderer/BlendShapes.h"
#include "renderer/DebugRenderer.h"
#include "renderer/Renderer.h"
#include "renderer/SceneRenderer.h"
#include "renderer/TerrainRenderer.h"
#include "renderer/VertexBuffer.h"
#include "renderer/WaterManager.h"
#include "renderer/backend/Format.h"
#include "renderer/backend/IBuffer.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include "simulation2/components/ICmpWaterManager.h"
#include "simulation2/system/Component.h"
#include "simulation2/system/Entity.h"
#include <algorithm>
#include <array>
#include <cstdint>
#include <cstring>
#include <functional>
#include <iterator>
#include <map>
#include <memory>
#include <numeric>
#include <string>
#include <utility>

Classes

struct  STileBlend
 Represents a blend for a single tile, texture and shape. More...
 
struct  STileBlend::DecreasingPriority
 
struct  STileBlend::CurrentTile
 
struct  STileBlendStack
 Represents the ordered collection of blends drawn on a particular tile. More...
 
struct  SBlendLayer
 Represents a batched collection of blends using the same texture. More...
 
struct  SBlendLayer::Tile
 
struct  SBlendBatch
 Helper structure for RenderBlends. More...
 
struct  SBlendStackItem
 Helper structure for RenderBlends. More...
 

Namespaces

namespace  Renderer
 
namespace  Renderer::Backend
 

Typedefs

template<class Key , class Value >
using PooledBatchMap = std::map< Key, Value, std::less< Key >, PS::Memory::AllocatorAdapter< std::pair< Key const, Value >, PS::Memory::ScopedLinearAllocator > >
 
using BatchElements = std::pair< std::vector< std::uint32_t, PS::Memory::AllocatorAdapter< std::uint32_t, PS::Memory::ScopedLinearAllocator > >, std::vector< std::uint32_t, PS::Memory::AllocatorAdapter< std::uint32_t, PS::Memory::ScopedLinearAllocator > > >
 
using IndexBufferBatches = PooledBatchMap< CVertexBuffer *, BatchElements >
 
using VertexBufferBatches = PooledBatchMap< CVertexBuffer *, IndexBufferBatches >
 
using TextureBatches = PooledBatchMap< CTerrainTextureEntry *, VertexBufferBatches >
 
using ShaderTechniqueBatches = PooledBatchMap< std::pair< CStrIntern, CShaderDefines >, TextureBatches >
 

Functions

template<typename M >
M::mapped_type & PooledMapGet (M &m, const typename M::key_type &k, PS::Memory::ScopedLinearAllocator &arena)
 
template<typename M >
M::mapped_type & PooledPairGet (M &m, const typename M::key_type &k, PS::Memory::ScopedLinearAllocator &arena)
 

Variables

const ssize_t BlendOffsets [9][2]
 

Typedef Documentation

◆ BatchElements

using BatchElements = std::pair< std::vector<std::uint32_t, PS::Memory::AllocatorAdapter<std::uint32_t, PS::Memory::ScopedLinearAllocator> >, std::vector<std::uint32_t, PS::Memory::AllocatorAdapter<std::uint32_t, PS::Memory::ScopedLinearAllocator> >>

◆ IndexBufferBatches

◆ PooledBatchMap

template<class Key , class Value >
using PooledBatchMap = std::map<Key, Value, std::less<Key>, PS::Memory::AllocatorAdapter<std::pair<Key const, Value>, PS::Memory::ScopedLinearAllocator> >

◆ ShaderTechniqueBatches

◆ TextureBatches

◆ VertexBufferBatches

Function Documentation

◆ PooledMapGet()

template<typename M >
M::mapped_type & PooledMapGet ( M &  m,
const typename M::key_type &  k,
PS::Memory::ScopedLinearAllocator &  arena 
)

◆ PooledPairGet()

template<typename M >
M::mapped_type & PooledPairGet ( M &  m,
const typename M::key_type &  k,
PS::Memory::ScopedLinearAllocator &  arena 
)

Variable Documentation

◆ BlendOffsets

const ssize_t BlendOffsets[9][2]
Initial value:
= {
{ 0, -1 },
{ -1, -1 },
{ -1, 0 },
{ -1, 1 },
{ 0, 1 },
{ 1, 1 },
{ 1, 0 },
{ 1, -1 },
{ 0, 0 }
}