mouse controls, fixed texture loading

This commit is contained in:
2026-04-27 22:33:40 +03:00
parent cbcfdce047
commit 9569555347
31 changed files with 112 additions and 40 deletions

View File

@@ -397,11 +397,11 @@ uint32_t CVkTextureArray::CreateTexture( uint32_t i, const char *szPath )
IBuffer *pBuffer = m_pRenderContext->CreateStorageBuffer(uWidth*uHeight*4);
pBuffer->Lock();
void *pData = pBuffer->Map();
V_memcpy(pData, pImg, uWidth*uHeight*uChannels);
V_memcpy(pData, pImg, uWidth*uHeight*4);
pBuffer->Unmap();
pBuffer->Unlock();
vkDeviceWaitIdle(s_vkDevice);
IImage *pImage = m_pRenderContext->CreateTexture(uWidth, uHeight, IMAGE_FORMAT_RGBA8_UNORM, MULTISAMPLE_TYPE_NONE);
IImage *pCompressedImage = m_pRenderContext->CreateTexture(uWidth, uHeight, IMAGE_FORMAT_BC1, MULTISAMPLE_TYPE_NONE);
m_pImages[i] = (CVkImage*)pImage;
stbi_image_free(pImg);