HighMap library (C++)
Loading...
Searching...
No Matches
virtual_texture_storage.hpp
Go to the documentation of this file.
1/* Copyright (c) 2025 Otto Link. Distributed under the terms of the GNU General
2 Public License. The full license is in the file LICENSE, distributed with
3 this software. */
4
10#pragma once
11
13
14namespace hmap
15{
16
25{
26 std::vector<std::unique_ptr<TileStorage>> channel_storages;
27
28 // --- Constructor: creates N channels
29
30 VirtualTextureStorage(int nchannels,
31 std::unique_ptr<TileStorage> storage_proto);
32
33 // --- Access per channel
34
35 TileStorage &channel(int idx);
36 const TileStorage &channel(int idx) const;
37 int channel_count() const;
38
39 // --- Free memory: release all tiles
40
41 void trim_storage();
42};
43
44} // namespace hmap
Definition tile_storage.hpp:62
Definition algebra.hpp:23
Storage manager for VirtualTexture.
Definition virtual_texture_storage.hpp:25
void trim_storage()
Definition virtual_texture_storage.cpp:43
std::vector< std::unique_ptr< TileStorage > > channel_storages
Definition virtual_texture_storage.hpp:26
int channel_count() const
Definition virtual_texture_storage.cpp:38
TileStorage & channel(int idx)
Definition virtual_texture_storage.cpp:28