candlewick 0.1.0
A renderer
|
Namespaces | |
namespace | camera_util |
namespace | constants |
namespace | detail |
namespace | effects |
namespace | frustum_debug |
namespace | math |
namespace | media |
namespace | multibody |
Support for the Pinocchio rigid-body algorithms library and the Coal collision detection library. | |
namespace | rend |
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 | GuiSystem |
struct | IDebugSubSystem |
A subsystem for the DebugScene. 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 | Renderer |
The Renderer class provides a rendering context for a graphical application. More... | |
struct | Shader |
RAII wrapper around SDL_GPUShader , with loading utilities. More... | |
class | ShadowMapPass |
Helper struct for shadow mapping pass. More... | |
class | strided_view |
A strided view to data, allowing for type-erased data. More... | |
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 | IsVertexType |
Basic concept checking if type V has the correct layout and alignment requirements to be a vertex element. | |
concept | Scene |
Typedefs | |
using | ShadowPassConfig = ShadowMapPass::Config |
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> |
using | OpaqueCastable = std::tuple<const Mesh &, Mat4f> |
Intermediary argument type for shadow-casting or opaque objects. For use in depth or light pre-passes. | |
Enumerations | |
enum class | CameraProjection { PERSPECTIVE , ORTHOGRAPHIC } |
enum class | DebugPipelines { TRIANGLE_FILL , LINE } |
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 OBB &obb) |
bool | updateTransparencyClassification (entt::registry ®, entt::entity entity, const MeshMaterialComponent &mmc) |
Updates (adds or removes) the Opaque tag component for a given entity. | |
void | renderDepthDebug (const Renderer &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> | |
void | terminate_with_message (std::source_location location, std::string_view fmt, Ts &&...args) |
template<typename... Ts> | |
void | terminate_with_message (std::string_view fmt, Ts &&...args) |
void | unreachable_with_message (std::string_view msg, std::source_location location=std::source_location::current()) |
std::string | generateMediaFilenameFromTimestamp (const char *prefix="cdw_screenshot", const char *extension=".png", DialogFileType file_type=DialogFileType::IMAGES) |
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. | |
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. | |
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) |
template<typename T> requires std::is_enum_v<T> | |
void | invalid_enum (const char *msg, T type, std::source_location location=std::source_location::current()) |
Terminate the application after encountering an invalid enum value. | |
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. | |
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 | frustumFromCameraProjection (const Mat4f &camProj) |
Extract the array of frustum corners, given a camera projection matrix. | |
FrustumCornersType | frustumFromCamera (const Camera &camera) |
Get the corners of a Camera's view frustum, in world space. | |
std::pair< Float3, float > | frustumBoundingSphereCenterRadius (const FrustumCornersType &worldSpaceCorners) |
void | renderShadowPassFromAABB (CommandBuffer &cmdBuf, ShadowMapPass &passInfo, const DirectionalLight &dirLight, std::span< const OpaqueCastable > castables, const AABB &worldSceneBounds) |
Render shadow pass, using provided scene bounds. | |
void | renderShadowPassFromFrustum (CommandBuffer &cmdBuf, ShadowMapPass &passInfo, 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 {} |
enum class | DialogFileType { IMAGES , VIDEOS } |
void | showCandlewickAboutWindow (bool *p_open=NULL, float wrap_width=400.f) |
Show an about window providing information about Candlewick. | |
void | guiAddLightControls (DirectionalLight &light) |
Adds a set of ImGui elements to control a DirectionalLight. | |
void | guiAddDisableCheckbox (const char *label, entt::registry ®, entt::entity id, bool &flag) |
Adds an ImGui::Checkbox which toggles the Disable component on the entity. | |
void | guiAddFileDialog (SDL_Window *window, DialogFileType dialog_file_type, std::string &filename) |
Add a GUI button-text pair to select a file to save something to. | |
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 |
Return codes for loadSceneMeshes().
Enumerator | |
---|---|
FAILED_TO_LOAD | |
NO_MESHES | |
OK |
|
strong |
void candlewick::apply3DTransformInPlace | ( | MeshData & | meshData, |
const Eigen::Affine3f & | tr ) |
Apply an Eigen::Affine3f
3D transform to a mesh in-place, transforming its vertices.
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 |
Get the corners of a Camera's view frustum, in world space.
|
inline |
Extract the array of frustum corners, given a camera projection matrix.
Convert MeshData
object to an indexed mesh.
meshData | the input un-indexed MeshData object to be transformed. |
std::string candlewick::generateMediaFilenameFromTimestamp | ( | const char * | prefix = "cdw_screenshot", |
const char * | extension = ".png", | ||
DialogFileType | file_type = DialogFileType::IMAGES ) |
void candlewick::guiAddDisableCheckbox | ( | const char * | label, |
entt::registry & | reg, | ||
entt::entity | id, | ||
bool & | flag ) |
Adds an ImGui::Checkbox which toggles the Disable component on the entity.
void candlewick::guiAddFileDialog | ( | SDL_Window * | window, |
DialogFileType | dialog_file_type, | ||
std::string & | filename ) |
Add a GUI button-text pair to select a file to save something to.
This function can only be called from the main thread.
void candlewick::guiAddLightControls | ( | DirectionalLight & | light | ) |
Adds a set of ImGui elements to control a DirectionalLight.
|
inline |
Vec4u8 candlewick::hexToRgbai | ( | unsigned long | hex | ) |
|
inline |
Vec3u8 candlewick::hexToRgbi | ( | unsigned long | hex | ) |
void candlewick::invalid_enum | ( | const char * | msg, |
T | type, | ||
std::source_location | location = std::source_location::current() ) |
Terminate the application after encountering an invalid enum value.
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 Renderer & | renderer, |
CommandBuffer & | cmdBuf, | ||
const DepthDebugPass & | pass, | ||
const DepthDebugPass::Options & | opts ) |
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 > |
void candlewick::terminate_with_message | ( | std::source_location | location, |
std::string_view | fmt, | ||
Ts &&... | args ) |
void candlewick::terminate_with_message | ( | std::string_view | fmt, |
Ts &&... | args ) |
|
inline |
|
inline |
void candlewick::triangleStripGenerateIndices | ( | Uint32 | vertexCount, |
std::vector< Uint32 > & | indices ) |
Generate indices for a triangle strip geometry, given the vertex count.
|
inline |
|
inline |
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 |