VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
indexBuffer.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 "
indexBuffer.h
"
7
8
#include <assert.h>
9
10
#include "
graphicsDevice.h
"
11
12
namespace
visutwin::canvas
13
{
14
int
IndexBuffer::_nextId = 0;
15
16
IndexBuffer::IndexBuffer
(
GraphicsDevice
* graphicsDevice,
IndexFormat
format
,
int
numIndices
)
17
:
_device
(graphicsDevice), _format(
format
), _numIndices(
numIndices
)
18
{
19
assert(graphicsDevice !=
nullptr
&&
"GraphicsDevice cannot be null"
);
20
assert(
numIndices
> 0 &&
"Number of indices must be greater than 0"
);
21
//assert(IndexBufferUtils::validateParameters(format, numIndices, usage), "Invalid index buffer parameters");
22
}
23
}
visutwin::canvas::GraphicsDevice
Abstract GPU interface for resource creation, state management, and draw submission.
Definition
graphicsDevice.h:239
visutwin::canvas::IndexBuffer::numIndices
int numIndices() const
Definition
indexBuffer.h:35
visutwin::canvas::IndexBuffer::_device
GraphicsDevice * _device
Definition
indexBuffer.h:48
visutwin::canvas::IndexBuffer::format
IndexFormat format() const
Definition
indexBuffer.h:33
visutwin::canvas::IndexBuffer::IndexBuffer
IndexBuffer(GraphicsDevice *graphicsDevice, IndexFormat format, int numIndices)
Definition
indexBuffer.cpp:16
graphicsDevice.h
indexBuffer.h
visutwin::canvas
Definition
eventHandler.cpp:9
visutwin::canvas::IndexFormat
IndexFormat
Definition
indexBuffer.h:13
platform
graphics
indexBuffer.cpp
Generated by
1.16.1