VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
vertexFormat.cpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: Apache-2.0
2
// Copyright 2025-2026 Arnis Lektauers
3
//
4
// Created by Arnis Lektauers on 13.09.2025.
5
//
6
#include "
vertexFormat.h
"
7
8
#include <functional>
9
10
namespace
visutwin::canvas
11
{
12
VertexFormat::VertexFormat
(
const
int
size
,
const
bool
interleaved,
const
bool
instancing)
13
: _size(
size
), _interleaved(interleaved), _instancing(instancing)
14
{
15
_verticesByteSize = 0;
16
_renderingHashString = std::to_string(
size
) +
":"
+ (interleaved ?
"i"
:
"ni"
) +
":"
+ (instancing ?
"1"
:
"0"
);
17
_renderingHash =
static_cast<
uint32_t
>
(std::hash<std::string>{}(_renderingHashString));
18
}
19
}
visutwin::canvas::VertexFormat::VertexFormat
VertexFormat(int size, bool interleaved=true, bool instancing=false)
Definition
vertexFormat.cpp:12
visutwin::canvas::VertexFormat::size
int size() const
Definition
vertexFormat.h:68
visutwin::canvas
Definition
eventHandler.cpp:9
vertexFormat.h
platform
graphics
vertexFormat.cpp
Generated by
1.16.1