VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
textureUtils.h
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 19.09.2025.
5//
6
7#pragma once
8
9#include <cstdint>
10
11namespace visutwin::canvas
12{
14 {
15 public:
16 // Calculate the dimension of a texture at a specific mip level
17 static uint32_t calcLevelDimension(uint32_t dimension, uint32_t mipLevel);
18
19 // Calculate the number of mip levels for a texture with the specified dimensionss
20 static uint32_t calcMipLevelsCount(uint32_t width, uint32_t height, uint32_t depth = 1);
21 };
22}
static uint32_t calcLevelDimension(uint32_t dimension, uint32_t mipLevel)
static uint32_t calcMipLevelsCount(uint32_t width, uint32_t height, uint32_t depth=1)