3#include <Core/ResourceManager/Resource.h>
4#include <RendererCore/Meshes/MeshBufferResource.h>
5#include <RendererCore/RendererCoreDLL.h>
6#include <RendererFoundation/RendererFoundationDLL.h>
12 plGALPrimitiveTopology::Enum m_Topology = plGALPrimitiveTopology::Triangles;
13 plGALIndexType::Enum m_IndexType = plGALIndexType::UInt;
14 plUInt32 m_uiMaxPrimitives = 0;
15 plUInt32 m_uiMaxVertices = 0;
16 bool m_bColorStream =
false;
21 PL_DECLARE_POD_TYPE();
29 PL_ALWAYS_INLINE
void EncodeNormal(
const plVec3& vNormal)
32 m_vEncodedNormal = vNormal * 0.5f +
plVec3(0.5f);
38 PL_ALWAYS_INLINE
void EncodeTangent(
const plVec3& vTangent,
float fBitangentSign)
41 m_vEncodedTangent.x = vTangent.x * 0.5f + 0.5f;
42 m_vEncodedTangent.y = vTangent.y * 0.5f + 0.5f;
43 m_vEncodedTangent.z = vTangent.z * 0.5f + 0.5f;
44 m_vEncodedTangent.w = fBitangentSign < 0.0f ? 0.0f : 1.0f;
62 PL_ALWAYS_INLINE
plGALBufferHandle GetVertexBuffer()
const {
return m_hVertexBuffer; }
63 PL_ALWAYS_INLINE
plGALBufferHandle GetIndexBuffer()
const {
return m_hIndexBuffer; }
64 PL_ALWAYS_INLINE
plGALBufferHandle GetColorBuffer()
const {
return m_hColorBuffer; }
117 virtual void UpdateMemoryUsage(MemoryUsage& out_NewMemoryUsage)
override;
119 bool m_bAccessedVB =
false;
120 bool m_bAccessedIB =
false;
121 bool m_bAccessedCB =
false;
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
Definition DynamicArray.h:81
Definition DynamicMeshBufferResource.h:52
plArrayPtr< plColorLinearUB > AccessColorData()
Grants write access to the color data, and flags the data as 'dirty'.
Definition DynamicMeshBufferResource.h:94
plArrayPtr< plDynamicMeshVertex > AccessVertexData()
Grants write access to the vertex data, and flags the data as 'dirty'.
Definition DynamicMeshBufferResource.h:67
plArrayPtr< plUInt32 > AccessIndex32Data()
Grants write access to the 32 bit index data, and flags the data as 'dirty'.
Definition DynamicMeshBufferResource.h:85
plArrayPtr< plUInt16 > AccessIndex16Data()
Grants write access to the 16 bit index data, and flags the data as 'dirty'.
Definition DynamicMeshBufferResource.h:76
Definition RendererFoundationDLL.h:418
Definition CommandEncoder.h:11
The base class for all resources.
Definition Resource.h:10
Interface for binary in (read) streams.
Definition Stream.h:22
constexpr TYPE MaxValue()
Returns the largest possible positive value (that is not infinity).
Definition DynamicMeshBufferResource.h:11
Definition DynamicMeshBufferResource.h:20
Enum
Definition RendererFoundationDLL.h:336
@ Discard
Buffer must be completely overwritten. No old data will be read. Data will not persist across frames.
Definition RendererFoundationDLL.h:337
Describes in which loading state a resource currently is, and how many different quality levels there...
Definition Declarations.h:102
Definition MeshBufferResource.h:24