mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-02 09:41:13 -06:00
Remove fmt::format and replace with std::format
This commit is contained in:
@@ -635,7 +635,7 @@ RenderablePointCloud::RenderablePointCloud(const ghoul::Dictionary& dictionary)
|
||||
_texturesDirectory = absPath(*t.folder).string();
|
||||
|
||||
if (t.file.has_value()) {
|
||||
LWARNING(fmt::format(
|
||||
LWARNING(std::format(
|
||||
"Both a single texture File and multi-texture Folder was provided. "
|
||||
"The folder '{}' has priority and the single texture with the "
|
||||
"following path will be ignored: '{}'", *t.folder, *t.file
|
||||
@@ -842,7 +842,7 @@ void RenderablePointCloud::initializeSingleTexture() {
|
||||
std::filesystem::path p = absPath(_texture.spriteTexturePath);
|
||||
|
||||
if (!std::filesystem::is_regular_file(p)) {
|
||||
throw ghoul::RuntimeError(fmt::format(
|
||||
throw ghoul::RuntimeError(std::format(
|
||||
"Could not find image file '{}'", p
|
||||
));
|
||||
}
|
||||
@@ -856,7 +856,7 @@ void RenderablePointCloud::initializeMultiTextures() {
|
||||
std::filesystem::path path = _texturesDirectory / tex.file;
|
||||
|
||||
if (!std::filesystem::is_regular_file(path)) {
|
||||
throw ghoul::RuntimeError(fmt::format(
|
||||
throw ghoul::RuntimeError(std::format(
|
||||
"Could not find image file '{}'", path
|
||||
));
|
||||
}
|
||||
@@ -899,14 +899,14 @@ void RenderablePointCloud::loadTexture(const std::filesystem::path& path, int in
|
||||
bool useAlpha = (t->numberOfChannels() > 3) && _texture.useAlphaChannel;
|
||||
|
||||
if (t) {
|
||||
LINFOC("RenderablePlanesCloud", fmt::format("Loaded texture {}", path));
|
||||
LINFOC("RenderablePlanesCloud", std::format("Loaded texture {}", path));
|
||||
// Do not upload the loaded texture to the GPU, we just want it to hold the data.
|
||||
// However, convert textures make sure they all use the same format
|
||||
ghoul::opengl::Texture::Format targetFormat = glFormat(useAlpha);
|
||||
convertTextureFormat(*t, targetFormat);
|
||||
}
|
||||
else {
|
||||
throw ghoul::RuntimeError(fmt::format(
|
||||
throw ghoul::RuntimeError(std::format(
|
||||
"Could not find image file {}", path
|
||||
));
|
||||
}
|
||||
@@ -1024,7 +1024,7 @@ void RenderablePointCloud::generateArrayTextures() {
|
||||
int nMaxTextureLayers = 0;
|
||||
glGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &nMaxTextureLayers);
|
||||
if (static_cast<int>(layer) > nMaxTextureLayers) {
|
||||
LERROR(fmt::format(
|
||||
LERROR(std::format(
|
||||
"Too many layers bound in the same texture array. Found {} textures with "
|
||||
"resolution {}x{} pixels. Max supported is {}.",
|
||||
layer, res.x, res.y, nMaxTextureLayers
|
||||
@@ -1333,11 +1333,11 @@ void RenderablePointCloud::updateBufferData() {
|
||||
|
||||
if (_vao == 0) {
|
||||
glGenVertexArrays(1, &_vao);
|
||||
LDEBUG(fmt::format("Generating Vertex Array id '{}'", _vao));
|
||||
LDEBUG(std::format("Generating Vertex Array id '{}'", _vao));
|
||||
}
|
||||
if (_vbo == 0) {
|
||||
glGenBuffers(1, &_vbo);
|
||||
LDEBUG(fmt::format("Generating Vertex Buffer Object id '{}'", _vbo));
|
||||
LDEBUG(std::format("Generating Vertex Buffer Object id '{}'", _vbo));
|
||||
}
|
||||
|
||||
glBindVertexArray(_vao);
|
||||
|
||||
Reference in New Issue
Block a user