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#include "macrologger.h"
12
14
15namespace hmap
16{
17
26{
27 std::vector<std::unique_ptr<TileStorage>> channel_storages;
28
29 // --- Constructor: creates N channels
30
31 VirtualTextureStorage(int nchannels,
32 std::unique_ptr<TileStorage> storage_proto);
33
34 // --- Access per channel
35
36 TileStorage &channel(int idx);
37 const TileStorage &channel(int idx) const;
38 int channel_count() const;
39
40 // --- Free memory: release all tiles
41
42 void trim_storage();
43};
44
45} // namespace hmap
Definition tile_storage.hpp:61
Definition algebra.hpp:22
Storage manager for VirtualTexture.
Definition virtual_texture_storage.hpp:26
void trim_storage()
Definition virtual_texture_storage.cpp:42
std::vector< std::unique_ptr< TileStorage > > channel_storages
Definition virtual_texture_storage.hpp:27
int channel_count() const
Definition virtual_texture_storage.cpp:37
TileStorage & channel(int idx)
Definition virtual_texture_storage.cpp:27