Refactoring KRTexture2D::uploadTexture, replacing with getLodData.
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
This commit is contained in:
@@ -391,8 +391,9 @@ long KRTextureKTX::getMemRequiredForSize(int max_dim)
|
||||
return memoryRequired;
|
||||
}
|
||||
|
||||
bool KRTextureKTX::uploadTexture(KRDevice& device, VkImage& image, int lod_max_dim, int& current_lod_max_dim, bool premultiply_alpha)
|
||||
bool KRTextureKTX::getLodData(void* buffer, int lod_max_dim)
|
||||
{
|
||||
unsigned char* converted_image = (unsigned char*)buffer;
|
||||
int target_dim = lod_max_dim;
|
||||
if (target_dim < (int)m_min_lod_max_dim) target_dim = m_min_lod_max_dim;
|
||||
|
||||
@@ -414,12 +415,14 @@ bool KRTextureKTX::uploadTexture(KRDevice& device, VkImage& image, int lod_max_d
|
||||
Block* block = *itr;
|
||||
if (width <= target_dim && height <= target_dim) {
|
||||
|
||||
/*
|
||||
if (width > current_lod_max_dim) {
|
||||
current_lod_max_dim = width;
|
||||
}
|
||||
if (height > current_lod_max_dim) {
|
||||
current_lod_max_dim = height;
|
||||
}
|
||||
*/
|
||||
|
||||
block->lock();
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user