|
candlewick 0.10.0-4-g76c0
A tiny cross-platform renderer based on SDL3
|
Namespaces | |
| namespace | camera_util |
| namespace | constants |
| namespace | detail |
| namespace | effects |
| namespace | frustum_debug |
| namespace | gui |
| GUI utilities. | |
| namespace | math |
| namespace | media |
| namespace | multibody |
| Support for the Pinocchio rigid-body algorithms library and the Coal collision detection library. | |
| namespace | rend |
| namespace | runtime |
| namespace | ssao |
Classes | |
| struct | Camera |
| The main way of using a camera to render things. More... | |
| class | CommandBuffer |
| struct | CylindricalCamera |
| struct | DebugBoundsComponent |
| struct | DebugFrustumComponent |
| struct | DebugMeshComponent |
| class | DebugScene |
| Scene for organizing debug entities and render systems. More... | |
| struct | DefaultVertex |
| struct | Deg |
| Strong type for floating-point variables representing angles (in degrees). More... | |
| struct | DepthDebugPass |
| class | DepthPass |
| Helper struct for depth or light pre-passes. More... | |
| struct | Device |
RAII wrapper for SDL_GPUDevice. More... | |
| struct | DirectionalLight |
| struct | Disable |
| Tag struct for disabled (invisible) entities. More... | |
| struct | EnvironmentTag |
| class | FrustumBoundsDebugSystem |
| struct | GpuMat3 |
| class | GraphicsPipeline |
| Class representing a graphics pipeline. More... | |
| class | GuiSystem |
| struct | IDebugSubSystem |
| A subsystem for the DebugScene. More... | |
| struct | LambertMaterial |
| Material for non-shiny objects, without specular highlights, using the non-physically based Lambert reflectance model. More... | |
| class | Mesh |
| Handle class for meshes (vertex buffers and an optional index buffer) on the GPU. More... | |
| class | MeshData |
| A class to store type-erased vertex data and index data. More... | |
| struct | MeshDataBase |
| struct | MeshDataView |
| class | MeshLayout |
| This class defines the layout of a mesh's vertices. More... | |
| struct | MeshMaterialComponent |
| class | MeshView |
| A view into a Mesh object. More... | |
| struct | NoInitT |
| Tag type for non-initializing constructors (for e.g. RAII classes) More... | |
| struct | Opaque |
| Tag struct for denoting an entity as opaque, for render pass organization. More... | |
| struct | PbrMaterial |
| PBR material for metallic-roughness workflow. More... | |
| struct | PhongMaterial |
| Material parameters for a Blinn-Phong lighting model. More... | |
| struct | PosNormalVertex |
| struct | PosOnlyVertex |
| struct | Rad |
| Strong type for floating-point variables representing angles (in radians). More... | |
| struct | RAIIException |
| Wrapper for std::runtime_error, which prints out the filename and code line. More... | |
| struct | RenderContext |
| The RenderContext class provides a rendering context for a graphical application. More... | |
| struct | Shader |
RAII wrapper around SDL_GPUShader, with loading utilities. More... | |
| class | ShadowMapPass |
| Class for defining the shadow maps (as an atlas) and rendering into it. More... | |
| struct | ShadowPassConfig |
| class | strided_view |
| A strided view to data, allowing for type-erased data. More... | |
| struct | terminate_with_message |
| class | Texture |
| struct | TransformComponent |
| struct | TransformUniformData |
| struct | VertexTraits |
| struct | VertexTraits< DefaultVertex > |
| struct | VertexTraits< PosNormalVertex > |
| struct | VertexTraits< PosOnlyVertex > |
| struct | Window |
RAII wrapper for the SDL_Window opaque type. More... | |
Concepts | |
| concept | GpuCompatibleData |
| concept | Scene |
| The Scene concept requires that there exist functions to render the scene. Provided a command buffer and Camera, and that there is a function to release the resources of the Scene. | |
| concept | IsVertexType |
| Basic concept checking if type V has the correct layout and alignment requirements to be a vertex element. | |
Typedefs | |
| using | OpaqueCastable = std::tuple<const Mesh &, Mat4f> |
| Intermediary argument type for shadow-casting or opaque objects. For use in depth or light pre-passes. | |
| using | Float2 = Eigen::Vector2f |
| using | Float3 = Eigen::Vector3f |
| using | Float4 = Eigen::Vector4f |
| using | Mat3f = Eigen::Matrix3f |
| using | Mat4f = Eigen::Matrix4f |
| using | Vec3u8 = Eigen::Matrix<Uint8, 3, 1> |
| using | Vec4u8 = Eigen::Matrix<Uint8, 4, 1> |
| using | FrustumCornersType = std::array<Float3, 8ul> |
| using | GpuVec2 = Eigen::Matrix<float, 2, 1, Eigen::DontAlign> |
| using | GpuVec3 = Eigen::Matrix<float, 3, 1, Eigen::DontAlign> |
| using | GpuVec4 = Eigen::Matrix<float, 4, 1, Eigen::DontAlign> |
| using | GpuMat4 = Eigen::Matrix<float, 4, 4, Eigen::ColMajor | Eigen::DontAlign> |
| using | Radf = Rad<float> |
| using | Degf = Deg<float> |
Enumerations | |
| enum class | CameraProjection { PERSPECTIVE , ORTHOGRAPHIC } |
| enum class | RenderMode { FILL , LINE } |
| enum class | DebugPipelines { TRIANGLE_FILL , TRIANGLE_LINE } |
| enum class | DebugMeshType { TRIAD , GRID , ARROW } |
| enum class | DialogFileType { IMAGES , VIDEOS } |
| enum class | VertexAttrib : Uint16 { Position , Normal , Tangent , Bitangent , Color0 , Color1 , TexCoord0 , TexCoord1 } |
| Fixed vertex attributes. More... | |
| enum class | mesh_load_retc : Uint16 { FAILED_TO_LOAD = 1 << 0 , NO_MESHES = 1 << 1 , OK = 1 << 4 } |
| Return codes for loadSceneMeshes(). More... | |
Functions | |
| Mat4f | toTransformationMatrix (const AABB &aabb) |
| Mat4f | toTransformationMatrix (const coal::OBB &obb) |
| std::array< Float3, 8 > | getAABBCorners (const AABB &aabb) |
| AABB | applyTransformToAABB (const AABB &aabb, const Mat4f &tr_) |
| bool | updateTransparencyClassification (entt::registry ®, entt::entity entity, const MeshMaterialComponent &mmc) |
| Updates (adds or removes) the Opaque tag component for a given entity. | |
| void | toggleDisable (entt::registry ®, entt::entity id, bool flag) |
| void | renderDepthDebug (const RenderContext &renderer, CommandBuffer &cmdBuf, const DepthDebugPass &pass, const DepthDebugPass::Options &opts) |
| SDL_GPUShaderFormat | auto_detect_shader_format_subset (const char *name=nullptr) |
| Automatically detect which subset of shader formats (MSL, SPIR-V) are compatible with the device. | |
| void | unreachable () |
| template<typename... Ts> | |
| terminate_with_message (std::string_view, Ts &&...) -> terminate_with_message< Ts... > | |
| template<typename... Ts> | |
| terminate_with_message (std::source_location, std::string_view, Ts &&...) -> terminate_with_message< Ts... > | |
| void | unreachable_with_message (std::string_view msg, std::source_location location=std::source_location::current()) |
| void | generateMediaFilenameFromTimestamp (const char *prefix, std::string &out, const char *extension=".png", DialogFileType file_type=DialogFileType::IMAGES) |
| Set input/output string to a generated filename computed from a timestamp. | |
| template<typename T> | |
| decltype(auto) | castCoalGeom (const coal::CollisionGeometry &geometry) |
| MeshData | loadCoalPrimitive (const coal::ShapeBase &geometry) |
| Load primitive given a coal::CollisionGeometry. | |
| MeshData | loadCoalConvex (const coal::ConvexBase &geom) |
| MeshData | loadCoalHeightField (const coal::HeightField< coal::AABB > &collGeom) |
| MeshData | loadCoalHeightField (const coal::HeightField< coal::OBBRSS > &collGeom) |
| constexpr double | deg2rad (double t) |
| constexpr float | deg2rad (float t) |
| constexpr float | rad2deg (float t) |
| template<std::floating_point T> | |
| Rad (T) -> Rad< T > | |
| template<std::floating_point T> | |
| Deg (T) -> Deg< T > | |
| template<std::floating_point T> | |
| constexpr Rad< T > | operator* (const Rad< T > &left, const T &right) |
| template<std::floating_point T> | |
| constexpr Rad< T > | operator* (const T &left, const Rad< T > &right) |
| constexpr auto | operator""_radf (long double t) |
| constexpr auto | operator""_rad (long double t) |
| constexpr auto | operator""_deg (long double t) |
| constexpr auto | operator""_degf (long double t) |
| Vec3u8 | hexToRgbi (unsigned long hex) |
| Vec4u8 | hexToRgbai (unsigned long hex) |
| Float3 | hexToRgbf (unsigned long hex) |
| Float4 | hexToRgbaf (unsigned long hex) |
| Float3 | operator""_rgbf (unsigned long long hex) |
| Float4 | operator""_rgbaf (unsigned long long hex) |
| Eigen::Vector3d | operator""_rgb (unsigned long long hex) |
| Eigen::Vector4d | operator""_rgba (unsigned long long hex) |
| bool | validateMesh (const Mesh &mesh) |
| Check that all vertex buffers were set, and consistency in the "indexed/non-indexed" status. | |
| bool | validateMeshView (const MeshView &view) |
| Validation for a MeshView object. | |
| constexpr Uint64 | vertexElementSize (SDL_GPUVertexElementFormat format) |
| bool | validateMeshLayout (const MeshLayout &layout) |
| Validation function. Checks if a MeshLayout produces invalid data for a Mesh. | |
| template<IsVertexType V> | |
| MeshLayout | meshLayoutFor () |
| Shortcut for extracting layout from compile-time struct. | |
| constexpr int | sdlSampleToValue (SDL_GPUSampleCount samples) |
| void | setShadersDirectory (const char *path) |
| Set the current (global) directory where shaders are to be found. | |
| const char * | currentShaderDirectory () |
| Get the current (global) directory where shaders are found. | |
| SDL_GPUShaderStage | detect_shader_stage (const char *filename) |
| const char * | shader_format_name (SDL_GPUShaderFormat shader_format) |
| Shader::Config | loadShaderMetadata (const char *shader_name) |
| Load shader config from metadata. Metadata filename (in JSON format) is inferred from the shader name. | |
| MeshData | loadArrowSolid (bool include_normals=false, float shaft_length=0.4f, float shaft_radius=0.01f, float head_length=0.1f, float head_radius=0.02f, Uint32 segments=32) |
| Load a solid 3D arrow. | |
| std::array< MeshData, 3 > | loadTriadSolid (float shaft_length=0.4f, float shaft_radius=0.01f, float head_length=0.1f, float head_radius=0.02f, Uint32 segments=32) |
| Create a 3D triad. | |
| MeshData | loadCapsuleSolid (Uint32 hemisphereRings, Uint32 segments, float length) |
| Load a capsule primitive. | |
| MeshData | loadConeSolid (Uint32 segments, float radius, float length) |
| Load a 3D solid cone. | |
| MeshDataView | loadCubeSolid () |
| Load MeshDataView for a cube. | |
| MeshData | loadCylinderSolid (Uint32 rings, Uint32 segments, float radius, float height) |
| Load a solid 3D cylinder. | |
| MeshData | loadGrid (Uint32 xyHalfSize, float scale=0.5f) |
| Load a line grid. | |
| MeshData | loadHeightfield (const Eigen::Ref< const Eigen::MatrixXf > &heights, const Eigen::Ref< const Eigen::VectorXf > &xgrid, const Eigen::Ref< const Eigen::VectorXf > &ygrid) |
| Load a heightfield, as line geometry. | |
| MeshDataView | loadPlane () |
| MeshData | loadPlaneTiled (float scale, Uint32 xrepeat, Uint32 yrepeat, bool centered=true) |
| MeshData | loadUvSphereSolid (Uint32 rings, Uint32 segments) |
| Load a sphere primitive organized in bottom-up rings and left-right segments. | |
| PbrMaterial | loadFromAssimpMaterial (aiMaterial *material) |
| Load our PBR material data from an assimp material. | |
| mesh_load_retc | loadSceneMeshes (const char *path, std::vector< MeshData > &meshData) |
| Load the meshes from the given path. This is implemented using the assimp library. | |
| Mesh | createMesh (const Device &device, const MeshData &meshData, bool upload=false) |
| Convert MeshData to a GPU Mesh object. This creates the required vertex buffer and index buffer (if required). | |
| Mesh | createMesh (const Device &device, const MeshData &meshData, SDL_GPUBuffer *vertexBuffer, SDL_GPUBuffer *indexBuffer) |
| Create a Mesh object from given mesh data, as a view into existing vertex and index buffers. | |
| Mesh | createMeshFromBatch (const Device &device, std::span< const MeshData > meshDatas, bool upload) |
| Create a Mesh from a batch of MeshData. | |
| void | uploadMeshToDevice (const Device &device, const MeshView &meshView, const MeshData &meshData) |
| Upload the contents of a single, individual mesh to the GPU device. | |
| void | uploadMeshToDevice (const Device &device, const Mesh &mesh, const MeshData &meshData) |
| Upload the contents of a single, individual mesh to the GPU device. | |
| void | extractMaterials (std::span< const MeshData > meshDatas, std::vector< PbrMaterial > &out) |
| std::vector< PbrMaterial > | extractMaterials (std::span< const MeshData > meshDatas) |
| void | apply3DTransformInPlace (MeshData &meshData, const Eigen::Affine3f &tr) |
Apply an Eigen::Affine3f 3D transform to a mesh in-place, transforming its vertices. | |
| void | triangleStripGenerateIndices (Uint32 vertexCount, std::vector< Uint32 > &indices) |
| Generate indices for a triangle strip geometry, given the vertex count. | |
| MeshData | generateIndices (const MeshData &meshData) |
Convert MeshData object to an indexed mesh. | |
| MeshData | mergeMeshes (std::span< const MeshData > meshes) |
| Merge meshes down to a single mesh with consistent indexing. | |
| MeshData | mergeMeshes (std::vector< MeshData > &&meshes) |
| Merge meshes down to a single mesh with consistent indexing. | |
| void | bgraToRgbaConvert (Uint32 *bgraPixels, Uint32 pixelCount) |
| In-place conversion from 8-bit BGRA to 8-bit RGBA. | |
| template<typename T> | |
| strided_view (T *first, size_t, size_t) -> strided_view< T > | |
| template<typename T, size_t extent> | |
| strided_view (std::span< T, extent >, size_t) -> strided_view< T > | |
| template<typename T, size_t arr_extent> | |
| strided_view (T(&)[arr_extent]) -> strided_view< T > | |
Camera view-projection utilities. | |
These functions should be used to construct Camera objects. | |
| Mat4f | lookAt (const Float3 &eye, const Float3 ¢er, const Float3 &up=Float3::UnitZ()) |
| Mat4f | perspectiveMatrix (float left, float right, float bottom, float top, float near, float far) |
| Compute perspective projection matrix, from clipping plane parameters (left, right, bottom, top, near, far). | |
| Mat4f | perspectiveFromFov (Radf fovY, float aspectRatio, float nearZ, float farZ) |
| Get perspective projection matrix given fov, aspect ratio, and clipping planes. | |
| Mat4f | orthographicMatrix (const Float2 &sizes, float nearZ, float farZ) |
| Compute a centered orthographic projection matrix. | |
| Mat4f | orthographicMatrix (float left, float right, float bottom, float top, float near, float far) |
| Compute an off-center orthographic projection matrix. | |
| float | orthoProjNear (const Mat4f &proj) |
| float | orthoProjFar (const Mat4f &proj) |
| float | perspectiveProjNear (const Mat4f &proj) |
| float | perspectiveProjFar (const Mat4f &proj) |
| FrustumCornersType | frustumFromCameraViewProj (const Mat4f &camProj) |
| Extract the array of frustum corners, given the camera view-projection matrix. | |
| std::pair< Float3, float > | frustumBoundingSphereCenterRadius (const FrustumCornersType &worldSpaceCorners) |
| void | frustumApplyTransform (FrustumCornersType &corners, const Mat4f &tr) |
| void | renderShadowPassFromAABB (CommandBuffer &cmdBuf, ShadowMapPass &passInfo, std::span< const DirectionalLight > dirLight, std::span< const OpaqueCastable > castables, const AABB &worldAABB) |
| Render shadow pass, using provided scene bounds. | |
| void | renderShadowPassFromFrustum (CommandBuffer &cmdBuf, ShadowMapPass &passInfo, std::span< const DirectionalLight > dirLight, std::span< const OpaqueCastable > castables, const FrustumCornersType &worldSpaceCorners) |
| Render shadow pass, using a provided world-space frustum. | |
| Mat4f | shadowOrthographicMatrix (const Float2 &sizes, float zMin, float zMax) |
| Orthographic matrix which maps to the negative-Z half-volume of the NDC cube, for depth-testing/shadow mapping purposes. | |
Variables | |
| constexpr const char * | g_default_shader_dir = CANDLEWICK_SHADER_BIN_DIR |
| constexpr NoInitT | NoInit {} |
| using candlewick::Float2 = Eigen::Vector2f |
| using candlewick::Float3 = Eigen::Vector3f |
| using candlewick::Float4 = Eigen::Vector4f |
| using candlewick::FrustumCornersType = std::array<Float3, 8ul> |
| using candlewick::GpuMat4 = Eigen::Matrix<float, 4, 4, Eigen::ColMajor | Eigen::DontAlign> |
| using candlewick::GpuVec2 = Eigen::Matrix<float, 2, 1, Eigen::DontAlign> |
| using candlewick::GpuVec3 = Eigen::Matrix<float, 3, 1, Eigen::DontAlign> |
| using candlewick::GpuVec4 = Eigen::Matrix<float, 4, 1, Eigen::DontAlign> |
| using candlewick::Mat3f = Eigen::Matrix3f |
| using candlewick::Mat4f = Eigen::Matrix4f |
| using candlewick::OpaqueCastable = std::tuple<const Mesh &, Mat4f> |
Intermediary argument type for shadow-casting or opaque objects. For use in depth or light pre-passes.
| using candlewick::Vec3u8 = Eigen::Matrix<Uint8, 3, 1> |
| using candlewick::Vec4u8 = Eigen::Matrix<Uint8, 4, 1> |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Return codes for loadSceneMeshes().
| Enumerator | |
|---|---|
| FAILED_TO_LOAD | |
| NO_MESHES | |
| OK | |
|
strong |
|
strong |
| void candlewick::apply3DTransformInPlace | ( | MeshData & | meshData, |
| const Eigen::Affine3f & | tr ) |
Apply an Eigen::Affine3f 3D transform to a mesh in-place, transforming its vertices.
|
inline |
| SDL_GPUShaderFormat candlewick::auto_detect_shader_format_subset | ( | const char * | name = nullptr | ) |
Automatically detect which subset of shader formats (MSL, SPIR-V) are compatible with the device.
| name | Device name. Pass nullptr (default) to auto-detect the best device. |
| void candlewick::bgraToRgbaConvert | ( | Uint32 * | bgraPixels, |
| Uint32 | pixelCount ) |
In-place conversion from 8-bit BGRA to 8-bit RGBA.
| bgraPixels | Pointer to input BGRA image. |
| pixelCount | Number of pixels in the BGRA image. |
| decltype(auto) candlewick::castCoalGeom | ( | const coal::CollisionGeometry & | geometry | ) |
|
nodiscard |
Convert MeshData to a GPU Mesh object. This creates the required vertex buffer and index buffer (if required).
|
nodiscard |
Create a Mesh from a batch of MeshData.
| [in] | device | GPU device |
| [in] | meshDatas | Batch of meshes |
| [in] | upload | Whether to upload the resulting Mesh to the device. |
| const char * candlewick::currentShaderDirectory | ( | ) |
Get the current (global) directory where shaders are found.
|
inlineconstexpr |
|
inlineconstexpr |
| SDL_GPUShaderStage candlewick::detect_shader_stage | ( | const char * | filename | ) |
|
inlinenodiscard |
|
inline |
|
inline |
|
inline |
|
inline |
Extract the array of frustum corners, given the camera view-projection matrix.
Convert MeshData object to an indexed mesh.
| meshData | the input un-indexed MeshData object to be transformed. |
| void candlewick::generateMediaFilenameFromTimestamp | ( | const char * | prefix, |
| std::string & | out, | ||
| const char * | extension = ".png", | ||
| DialogFileType | file_type = DialogFileType::IMAGES ) |
Set input/output string to a generated filename computed from a timestamp.
|
inline |
|
inline |
| Vec4u8 candlewick::hexToRgbai | ( | unsigned long | hex | ) |
|
inline |
| Vec3u8 candlewick::hexToRgbi | ( | unsigned long | hex | ) |
| MeshData candlewick::loadCoalConvex | ( | const coal::ConvexBase & | geom | ) |
| MeshData candlewick::loadCoalHeightField | ( | const coal::HeightField< coal::AABB > & | collGeom | ) |
| MeshData candlewick::loadCoalHeightField | ( | const coal::HeightField< coal::OBBRSS > & | collGeom | ) |
| MeshData candlewick::loadCoalPrimitive | ( | const coal::ShapeBase & | geometry | ) |
Load primitive given a coal::CollisionGeometry.
See the documentation on the available primitives.
| PbrMaterial candlewick::loadFromAssimpMaterial | ( | aiMaterial * | material | ) |
Load our PBR material data from an assimp material.
If the aiMaterial contains, in fact, a Phong material (PhongMaterial), then a PBR material will be approximated.
| mesh_load_retc candlewick::loadSceneMeshes | ( | const char * | path, |
| std::vector< MeshData > & | meshData ) |
Load the meshes from the given path. This is implemented using the assimp library.
| Shader::Config candlewick::loadShaderMetadata | ( | const char * | shader_name | ) |
Load shader config from metadata. Metadata filename (in JSON format) is inferred from the shader name.
| Mat4f candlewick::lookAt | ( | const Float3 & | eye, |
| const Float3 & | center, | ||
| const Float3 & | up = Float3::UnitZ() ) |
Compute view matrix looking at center from eye, with the camera pointing up towards up.
Merge meshes down to a single mesh with consistent indexing.
Merge meshes down to a single mesh with consistent indexing.
| MeshLayout candlewick::meshLayoutFor | ( | ) |
Shortcut for extracting layout from compile-time struct.
|
inline |
|
inline |
|
inline |
|
inline |
Compute a centered orthographic projection matrix.
| size | xy-plane view sizes |
| nearZ | Near clipping plane. This is where the rendering starts on the Z-axis (the positive direction of which points up towards you). |
| farZ | Far clipping plane, where rendering ends. A value of \(0\) stops the rendered volume at the camera (only things in front of camera will be rendered). |
| Mat4f candlewick::orthographicMatrix | ( | float | left, |
| float | right, | ||
| float | bottom, | ||
| float | top, | ||
| float | near, | ||
| float | far ) |
Compute an off-center orthographic projection matrix.
|
inline |
|
inline |
Get perspective projection matrix given fov, aspect ratio, and clipping planes.
| fovY | Vertical field of view in radians |
| aspectRatio | Width / Height |
| nearZ | Near clipping plane |
| farZ | Far clipping plane |
| Mat4f candlewick::perspectiveMatrix | ( | float | left, |
| float | right, | ||
| float | bottom, | ||
| float | top, | ||
| float | near, | ||
| float | far ) |
Compute perspective projection matrix, from clipping plane parameters (left, right, bottom, top, near, far).
|
inline |
|
inline |
|
inlineconstexpr |
| void candlewick::renderDepthDebug | ( | const RenderContext & | renderer, |
| CommandBuffer & | cmdBuf, | ||
| const DepthDebugPass & | pass, | ||
| const DepthDebugPass::Options & | opts ) |
|
inlineconstexpr |
| void candlewick::setShadersDirectory | ( | const char * | path | ) |
Set the current (global) directory where shaders are to be found.
| const char * candlewick::shader_format_name | ( | SDL_GPUShaderFormat | shader_format | ) |
| candlewick::strided_view | ( | std::span< T, extent > | , |
| size_t | ) -> strided_view< T > |
| candlewick::strided_view | ( | T * | first, |
| size_t | , | ||
| size_t | ) -> strided_view< T > |
| candlewick::strided_view | ( | T(&) | [arr_extent] | ) | -> strided_view< T > |
| candlewick::terminate_with_message | ( | std::source_location | , |
| std::string_view | , | ||
| Ts && | ... ) -> terminate_with_message< Ts... > |
| candlewick::terminate_with_message | ( | std::string_view | , |
| Ts && | ... ) -> terminate_with_message< Ts... > |
|
inline |
|
inline |
|
inline |
| void candlewick::triangleStripGenerateIndices | ( | Uint32 | vertexCount, |
| std::vector< Uint32 > & | indices ) |
Generate indices for a triangle strip geometry, given the vertex count.
|
inline |
| void candlewick::unreachable_with_message | ( | std::string_view | msg, |
| std::source_location | location = std::source_location::current() ) |
| bool candlewick::updateTransparencyClassification | ( | entt::registry & | reg, |
| entt::entity | entity, | ||
| const MeshMaterialComponent & | mmc ) |
Updates (adds or removes) the Opaque tag component for a given entity.
| reg | The entity registry |
| entity | The entity |
| mmc | The mesh-material element to inspect for existence of any transparent subobjects. |
| void candlewick::uploadMeshToDevice | ( | const Device & | device, |
| const Mesh & | mesh, | ||
| const MeshData & | meshData ) |
Upload the contents of a single, individual mesh to the GPU device.
| void candlewick::uploadMeshToDevice | ( | const Device & | device, |
| const MeshView & | meshView, | ||
| const MeshData & | meshData ) |
Upload the contents of a single, individual mesh to the GPU device.
This will upload the mesh data through a MeshView.
|
inlinenodiscard |
Check that all vertex buffers were set, and consistency in the "indexed/non-indexed" status.
|
inline |
Validation function. Checks if a MeshLayout produces invalid data for a Mesh.
|
inlinenodiscard |
Validation for a MeshView object.
Check that all vertex buffer handles are non-null, check that vertex count is nonzero, check consistency of indexing status (that index buffer is non-null iff the index count of this view is nonzero).
| view | Input view to validate. |
|
constexpr |
|
constexpr |
|
constexpr |