Renderer: Add mipmaps generation support
This commit is contained in:
@@ -168,6 +168,7 @@ namespace Nz
|
||||
textureCreationParams.type = textureData.type;
|
||||
textureCreationParams.usageFlags = textureData.usage;
|
||||
textureCreationParams.pixelFormat = textureData.format;
|
||||
textureCreationParams.levelCount = 1;
|
||||
|
||||
if (textureCreationParams.type == ImageType::Cubemap)
|
||||
textureCreationParams.layerCount = 6;
|
||||
|
||||
@@ -361,8 +361,7 @@ namespace Nz
|
||||
|
||||
texInfo.layerCount = (texInfo.type == ImageType::Cubemap) ? 6 : 1;
|
||||
|
||||
m_defaultTextures.depthTextures[i] = m_renderDevice->InstantiateTexture(texInfo);
|
||||
m_defaultTextures.depthTextures[i]->Update(whitePixels.data());
|
||||
m_defaultTextures.depthTextures[i] = m_renderDevice->InstantiateTexture(texInfo, whitePixels.data(), false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,8 +378,7 @@ namespace Nz
|
||||
texInfo.type = static_cast<ImageType>(i);
|
||||
texInfo.layerCount = (texInfo.type == ImageType::Cubemap) ? 6 : 1;
|
||||
|
||||
m_defaultTextures.whiteTextures[i] = m_renderDevice->InstantiateTexture(texInfo);
|
||||
m_defaultTextures.whiteTextures[i]->Update(whitePixels.data());
|
||||
m_defaultTextures.whiteTextures[i] = m_renderDevice->InstantiateTexture(texInfo, whitePixels.data(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace Nz
|
||||
{
|
||||
case BufferType::Index:
|
||||
case BufferType::Vertex:
|
||||
case BufferType::Upload:
|
||||
break; // TODO
|
||||
|
||||
case BufferType::Storage:
|
||||
|
||||
Reference in New Issue
Block a user