![]() |
Divide Framework 0.1
A free and open-source 3D Framework under heavy development
|
IMPrimitive replaces immediate mode calls to VB based rendering. More...
#include <IMPrimitive.h>
Public Member Functions | |
IMPrimitive (GFXDevice &context, const Str< 64 > &name) | |
~IMPrimitive ()=default | |
void | setPushConstants (const PushConstantsStruct &fastData) |
void | setUniformData (const UniformData &constants) |
void | setUniformDataAndConstants (const UniformData &constants, const PushConstantsStruct &fastData) |
void | setPipelineDescriptor (const PipelineDescriptor &descriptor) |
void | setTexture (const ImageView &texture, SamplerDescriptor sampler) |
void | begin (PrimitiveTopology type) |
void | end () |
void | beginBatch (bool reserveBuffers, U32 vertexCount, U32 attributeCount) |
void | endBatch () noexcept |
void | clearBatch () |
bool | hasBatch () const noexcept |
void | reset () |
void | vertex (F32 x, F32 y, F32 z) |
void | attribute1i (U32 attribLocation, I32 value) |
void | attribute1f (U32 attribLocation, F32 value) |
void | attribute2f (U32 attribLocation, vec2< F32 > value) |
void | attribute3f (U32 attribLocation, vec3< F32 > value) |
void | attribute4ub (U32 attribLocation, U8 x, U8 y, U8 z, U8 w) |
void | attribute4f (U32 attribLocation, F32 x, F32 y, F32 z, F32 w) |
void | vertex (const vec3< F32 > &vert) |
void | attribute4ub (const U32 attribLocation, const vec4< U8 > value) |
void | attribute4f (const U32 attribLocation, const vec4< F32 > &value) |
void | fromLines (const IM::LineDescriptor &lines) |
void | fromLines (const IM::LineDescriptor *lines, size_t count) |
void | fromFrustum (const IM::FrustumDescriptor &frustum) |
void | fromFrustums (const IM::FrustumDescriptor *frustums, size_t count) |
void | fromOBB (const IM::OBBDescriptor &box) |
void | fromOBBs (const IM::OBBDescriptor *boxes, size_t count) |
void | fromBox (const IM::BoxDescriptor &box) |
void | fromBoxes (const IM::BoxDescriptor *boxes, size_t count) |
void | fromSphere (const IM::SphereDescriptor &sphere) |
void | fromSpheres (const IM::SphereDescriptor *spheres, size_t count) |
void | fromCone (const IM::ConeDescriptor &cone) |
void | fromCones (const IM::ConeDescriptor *cones, size_t count) |
void | fromLines (const Line *lines, size_t count) |
template<size_t N> | |
void | fromLines (const std::array< IM::LineDescriptor, N > &lines) |
template<size_t N> | |
void | fromOBBs (const std::array< IM::OBBDescriptor, N > &obbs) |
template<size_t N> | |
void | fromBoxes (const std::array< IM::BoxDescriptor, N > &boxes) |
template<size_t N> | |
void | fromSpheres (const std::array< IM::SphereDescriptor, N > &spheres) |
template<size_t N> | |
void | fromCones (const std::array< IM::ConeDescriptor, N > &cones) |
void | getCommandBuffer (GFX::CommandBuffer &commandBufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) |
void | getCommandBuffer (const mat4< F32 > &worldMatrix, GFX::CommandBuffer &commandBufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) |
PROPERTY_R (Str< 64 >, name) | |
PROPERTY_RW (bool, forceWireframe, false) | |
Static Public Member Functions | |
static void | InitStaticData () |
Protected Member Functions | |
GFXDevice & | context () noexcept |
Private Member Functions | |
void | fromLinesInternal (const Line *lines, size_t count) |
Private Attributes | |
GFXDevice & | _context |
UniformData | _additionalUniforms |
PushConstantsStruct | _fastData |
NS_GLIM::GLIM_BATCH_uptr | _imInterface |
PipelineDescriptor | _basePipelineDescriptor {} |
ImageView | _texture {} |
SamplerDescriptor | _sampler {} |
std::array< bool, to_base(NS_GLIM::GLIM_BUFFER_TYPE::COUNT)> | _drawFlags |
std::array< size_t, to_base(NS_GLIM::GLIM_BUFFER_TYPE::COUNT)> | _indexCount |
std::array< Pipeline *, to_base(NS_GLIM::GLIM_BUFFER_TYPE::COUNT)> | _pipelines |
std::array< U8, to_base(NS_GLIM::GLIM_BUFFER_TYPE::COUNT)> | _indexBufferId |
GenericVertexData_ptr | _dataBuffer = nullptr |
GFX::MemoryBarrierCommand | _memCmd {} |
Friends | |
template<typename Data , size_t N> | |
struct | DebugPrimitiveHandler |
void | DestroyIMP (IMPrimitive *&) |
IMPrimitive replaces immediate mode calls to VB based rendering.
Definition at line 58 of file IMPrimitive.h.
Definition at line 65 of file IMPrimitive.cpp.
|
default |
Definition at line 116 of file IMPrimitive.cpp.
Definition at line 162 of file IMPrimitive.cpp.
Definition at line 126 of file IMPrimitive.cpp.
Definition at line 135 of file IMPrimitive.cpp.
|
inline |
Definition at line 94 of file IMPrimitive.h.
Definition at line 153 of file IMPrimitive.cpp.
Definition at line 93 of file IMPrimitive.h.
Definition at line 144 of file IMPrimitive.cpp.
void Divide::IMPrimitive::begin | ( | PrimitiveTopology | type | ) |
Definition at line 108 of file IMPrimitive.cpp.
Definition at line 96 of file IMPrimitive.cpp.
void Divide::IMPrimitive::clearBatch | ( | ) |
Definition at line 100 of file IMPrimitive.cpp.
|
inlineprotectednoexcept |
Definition at line 135 of file IMPrimitive.h.
void Divide::IMPrimitive::end | ( | ) |
Definition at line 171 of file IMPrimitive.cpp.
|
noexcept |
Definition at line 175 of file IMPrimitive.cpp.
void Divide::IMPrimitive::fromBox | ( | const IM::BoxDescriptor & | box | ) |
Definition at line 413 of file IMPrimitive.cpp.
void Divide::IMPrimitive::fromBoxes | ( | const IM::BoxDescriptor * | boxes, |
size_t | count | ||
) |
Definition at line 417 of file IMPrimitive.cpp.
|
inline |
Definition at line 118 of file IMPrimitive.h.
void Divide::IMPrimitive::fromCone | ( | const IM::ConeDescriptor & | cone | ) |
Definition at line 525 of file IMPrimitive.cpp.
void Divide::IMPrimitive::fromCones | ( | const IM::ConeDescriptor * | cones, |
size_t | count | ||
) |
Definition at line 529 of file IMPrimitive.cpp.
|
inline |
Definition at line 122 of file IMPrimitive.h.
void Divide::IMPrimitive::fromFrustum | ( | const IM::FrustumDescriptor & | frustum | ) |
Definition at line 287 of file IMPrimitive.cpp.
void Divide::IMPrimitive::fromFrustums | ( | const IM::FrustumDescriptor * | frustums, |
size_t | count | ||
) |
Definition at line 291 of file IMPrimitive.cpp.
void Divide::IMPrimitive::fromLines | ( | const IM::LineDescriptor & | lines | ) |
Definition at line 278 of file IMPrimitive.cpp.
void Divide::IMPrimitive::fromLines | ( | const IM::LineDescriptor * | lines, |
size_t | count | ||
) |
Definition at line 282 of file IMPrimitive.cpp.
void Divide::IMPrimitive::fromLines | ( | const Line * | lines, |
size_t | count | ||
) |
Definition at line 575 of file IMPrimitive.cpp.
|
inline |
Definition at line 114 of file IMPrimitive.h.
|
private |
Definition at line 589 of file IMPrimitive.cpp.
void Divide::IMPrimitive::fromOBB | ( | const IM::OBBDescriptor & | box | ) |
Definition at line 385 of file IMPrimitive.cpp.
void Divide::IMPrimitive::fromOBBs | ( | const IM::OBBDescriptor * | boxes, |
size_t | count | ||
) |
Definition at line 389 of file IMPrimitive.cpp.
|
inline |
Definition at line 116 of file IMPrimitive.h.
void Divide::IMPrimitive::fromSphere | ( | const IM::SphereDescriptor & | sphere | ) |
Definition at line 465 of file IMPrimitive.cpp.
void Divide::IMPrimitive::fromSpheres | ( | const IM::SphereDescriptor * | spheres, |
size_t | count | ||
) |
Definition at line 469 of file IMPrimitive.cpp.
|
inline |
Definition at line 120 of file IMPrimitive.h.
void Divide::IMPrimitive::getCommandBuffer | ( | const mat4< F32 > & | worldMatrix, |
GFX::CommandBuffer & | commandBufferInOut, | ||
GFX::MemoryBarrierCommand & | memCmdInOut | ||
) |
Definition at line 648 of file IMPrimitive.cpp.
void Divide::IMPrimitive::getCommandBuffer | ( | GFX::CommandBuffer & | commandBufferInOut, |
GFX::MemoryBarrierCommand & | memCmdInOut | ||
) |
Definition at line 643 of file IMPrimitive.cpp.
|
noexcept |
Definition at line 104 of file IMPrimitive.cpp.
|
static |
Definition at line 55 of file IMPrimitive.cpp.
Divide::IMPrimitive::PROPERTY_R | ( | Str< 64 > | , |
name | |||
) |
Divide::IMPrimitive::PROPERTY_RW | ( | bool | , |
forceWireframe | , | ||
false | |||
) |
void Divide::IMPrimitive::reset | ( | ) |
Definition at line 76 of file IMPrimitive.cpp.
void Divide::IMPrimitive::setPipelineDescriptor | ( | const PipelineDescriptor & | descriptor | ) |
Definition at line 629 of file IMPrimitive.cpp.
void Divide::IMPrimitive::setPushConstants | ( | const PushConstantsStruct & | fastData | ) |
Definition at line 613 of file IMPrimitive.cpp.
void Divide::IMPrimitive::setTexture | ( | const ImageView & | texture, |
SamplerDescriptor | sampler | ||
) |
Definition at line 637 of file IMPrimitive.cpp.
void Divide::IMPrimitive::setUniformData | ( | const UniformData & | constants | ) |
Definition at line 618 of file IMPrimitive.cpp.
void Divide::IMPrimitive::setUniformDataAndConstants | ( | const UniformData & | constants, |
const PushConstantsStruct & | fastData | ||
) |
Definition at line 623 of file IMPrimitive.cpp.
Definition at line 92 of file IMPrimitive.h.
Definition at line 112 of file IMPrimitive.cpp.
|
friend |
Definition at line 132 of file IMPrimitive.h.
|
friend |
Definition at line 3092 of file GFXDevice.cpp.
|
private |
Definition at line 142 of file IMPrimitive.h.
|
private |
Definition at line 145 of file IMPrimitive.h.
|
private |
Definition at line 141 of file IMPrimitive.h.
|
private |
Definition at line 152 of file IMPrimitive.h.
|
private |
Definition at line 148 of file IMPrimitive.h.
|
private |
Definition at line 143 of file IMPrimitive.h.
|
private |
Definition at line 144 of file IMPrimitive.h.
|
private |
Definition at line 151 of file IMPrimitive.h.
|
private |
Definition at line 149 of file IMPrimitive.h.
|
private |
Definition at line 154 of file IMPrimitive.h.
|
private |
Definition at line 150 of file IMPrimitive.h.
|
private |
Definition at line 147 of file IMPrimitive.h.
|
private |
Definition at line 146 of file IMPrimitive.h.