mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
- Change VKHardwareTexture::CreateTexture
to allow a null buffer to be passed. This is used by the software renderer to create an arbitrary texture for screen rendering.
This commit is contained in:
parent
bfb83abbc2
commit
a2d3dbf74e
1 changed files with 3 additions and 1 deletions
|
@ -270,7 +270,9 @@ uint8_t *VkHardwareTexture::MapBuffer()
|
|||
|
||||
unsigned int VkHardwareTexture::CreateTexture(unsigned char * buffer, int w, int h, int texunit, bool mipmap, const char *name)
|
||||
{
|
||||
CreateTexture(w, h, mTexelsize, mTexelsize == 4 ? VK_FORMAT_B8G8R8A8_UNORM : VK_FORMAT_R8_UNORM, buffer, mipmap);
|
||||
// CreateTexture is used by the software renderer to create a screen output but without any screen data.
|
||||
if (buffer)
|
||||
CreateTexture(w, h, mTexelsize, mTexelsize == 4 ? VK_FORMAT_B8G8R8A8_UNORM : VK_FORMAT_R8_UNORM, buffer, mipmap);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue