obs/gs/texture: Add new flags and fix flag decoding

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2021-04-26 04:19:21 +02:00 committed by Xaymar
parent 2923c5bd49
commit 295b1a5fca
2 changed files with 8 additions and 2 deletions

View file

@ -26,10 +26,14 @@
static uint32_t decode_flags(gs::texture::flags texture_flags)
{
uint32_t flags = 0;
if (exact(texture_flags, gs::texture::flags::Dynamic))
if (has(texture_flags, gs::texture::flags::Dynamic))
flags |= GS_DYNAMIC;
if (exact(texture_flags, gs::texture::flags::BuildMipMaps))
if (has(texture_flags, gs::texture::flags::BuildMipMaps))
flags |= GS_BUILD_MIPMAPS;
if (has(texture_flags, gs::texture::flags::Shared))
flags |= GS_SHARED_TEX;
if (has(texture_flags, gs::texture::flags::GlobalShared))
flags |= GS_SHARED_KM_TEX;
return flags;
}

View file

@ -29,6 +29,8 @@ namespace gs {
None,
Dynamic,
BuildMipMaps,
Shared,
GlobalShared,
};
protected: