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
11
namespace
visutwin::canvas
12
{
13
class
TextureUtils
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
}
visutwin::canvas::TextureUtils
Definition
textureUtils.h:14
visutwin::canvas::TextureUtils::calcLevelDimension
static uint32_t calcLevelDimension(uint32_t dimension, uint32_t mipLevel)
Definition
textureUtils.cpp:12
visutwin::canvas::TextureUtils::calcMipLevelsCount
static uint32_t calcMipLevelsCount(uint32_t width, uint32_t height, uint32_t depth=1)
Definition
textureUtils.cpp:17
visutwin::canvas
Definition
eventHandler.cpp:9
platform
graphics
textureUtils.h
Generated by
1.16.1