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
12namespace visutwin::canvas
13{
14 int IndexBuffer::_nextId = 0;
15
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}
Abstract GPU interface for resource creation, state management, and draw submission.
IndexFormat format() const
Definition indexBuffer.h:33
IndexBuffer(GraphicsDevice *graphicsDevice, IndexFormat format, int numIndices)