mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-23 20:05:11 +00:00
obs/gs/texture: Add new flags and fix flag decoding
This commit is contained in:
parent
1d183ae680
commit
96c7b101e5
2 changed files with 8 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ namespace gs {
|
|||
None,
|
||||
Dynamic,
|
||||
BuildMipMaps,
|
||||
Shared,
|
||||
GlobalShared,
|
||||
};
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in a new issue