mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Adds usage flags to backend textures.
This was SVN commit r27152.
This commit is contained in:
@@ -260,6 +260,8 @@ void CLOSTexture::ConstructTexture(Renderer::Backend::IDeviceCommandContext* dev
|
||||
}
|
||||
|
||||
m_Texture = backendDevice->CreateTexture2D("LOSTexture",
|
||||
Renderer::Backend::ITexture::Usage::TRANSFER_DST |
|
||||
Renderer::Backend::ITexture::Usage::SAMPLED,
|
||||
m_TextureFormat, textureSize, textureSize, defaultSamplerDesc);
|
||||
|
||||
// Initialise texture with SoD color, for the areas we don't
|
||||
@@ -270,10 +272,14 @@ void CLOSTexture::ConstructTexture(Renderer::Backend::IDeviceCommandContext* dev
|
||||
|
||||
if (CRenderer::IsInitialised() && g_RenderingOptions.GetSmoothLOS())
|
||||
{
|
||||
const uint32_t usage =
|
||||
Renderer::Backend::ITexture::Usage::TRANSFER_DST |
|
||||
Renderer::Backend::ITexture::Usage::SAMPLED |
|
||||
Renderer::Backend::ITexture::Usage::COLOR_ATTACHMENT;
|
||||
m_SmoothTextures[0] = backendDevice->CreateTexture2D("LOSSmoothTexture0",
|
||||
m_TextureFormat, textureSize, textureSize, defaultSamplerDesc);
|
||||
usage, m_TextureFormat, textureSize, textureSize, defaultSamplerDesc);
|
||||
m_SmoothTextures[1] = backendDevice->CreateTexture2D("LOSSmoothTexture1",
|
||||
m_TextureFormat, textureSize, textureSize, defaultSamplerDesc);
|
||||
usage, m_TextureFormat, textureSize, textureSize, defaultSamplerDesc);
|
||||
|
||||
m_SmoothFramebuffers[0] = backendDevice->CreateFramebuffer(
|
||||
"LOSSmoothFramebuffer0", m_SmoothTextures[0].get(), nullptr);
|
||||
|
||||
Reference in New Issue
Block a user