Allow changing texture compression setting without restarting stk
This commit is contained in:
parent
caf9fb448b
commit
1eb19e5e13
@ -181,6 +181,8 @@ void GEVulkanArrayTexture::reloadInternal(const std::vector<io::path>& list,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i == 0)
|
||||
m_internal_format = VK_FORMAT_R8G8B8A8_UNORM;
|
||||
mipmap_generator = new GEMipmapGenerator(texture_data, 4, m_size,
|
||||
normal_map);
|
||||
}
|
||||
|
@ -180,6 +180,8 @@ bool GEVulkanTexture::createTextureImage(uint8_t* texture_data,
|
||||
}
|
||||
else
|
||||
{
|
||||
m_internal_format = (isSingleChannel() ?
|
||||
VK_FORMAT_R8_UNORM : VK_FORMAT_R8G8B8A8_UNORM);
|
||||
mipmap_generator = new GEMipmapGenerator(texture_data, channels,
|
||||
m_size, normal_map);
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
#include "utils/translation.hpp"
|
||||
|
||||
#include <IGUIEnvironment.h>
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
#include <ge_main.hpp>
|
||||
#endif
|
||||
|
||||
using namespace GUIEngine;
|
||||
using namespace irr;
|
||||
@ -167,6 +169,9 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
|
||||
|
||||
UserConfigParams::m_texture_compression =
|
||||
getWidget<CheckBoxWidget>("texture_compression")->getState();
|
||||
#ifndef SERVER_ONLY
|
||||
GE::getGEConfig()->m_texture_compression = UserConfigParams::m_texture_compression;
|
||||
#endif
|
||||
|
||||
UserConfigParams::m_particles_effects =
|
||||
getWidget<SpinnerWidget>("particles_effects")->getValue();
|
||||
|
Loading…
Reference in New Issue
Block a user