mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-28 18:41:14 +00:00
5a3954ae0e
Fixes several files incorrectly stated a different license from the actual project, as well as the copyright headers included in all files. This change has no effect on the licensing terms, it should clear up a bit of confusion by contributors. Plus the files get a bit smaller, and we have less duplicated information across the entire project. Overall the project is GPLv2 if not built with Qt, and GPLv3 if it is built with Qt. There are no parts licensed under a different license, all have been adapted from other compatible licenses into GPLv2 or GPLv3.
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
// AUTOGENERATED COPYRIGHT HEADER START
|
|
// Copyright (C) 2019-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
|
// AUTOGENERATED COPYRIGHT HEADER END
|
|
|
|
#pragma once
|
|
#include "common.hpp"
|
|
#include "obs/gs/gs-rendertarget.hpp"
|
|
#include "obs/gs/gs-texture.hpp"
|
|
#include "obs/obs-source.hpp"
|
|
#include "obs/obs-weak-source.hpp"
|
|
|
|
#include "warning-disable.hpp"
|
|
#include <map>
|
|
#include "warning-enable.hpp"
|
|
|
|
namespace streamfx::gfx {
|
|
class source_texture {
|
|
streamfx::obs::source _parent;
|
|
streamfx::obs::source _child;
|
|
|
|
std::shared_ptr<streamfx::obs::gs::rendertarget> _rt;
|
|
|
|
public:
|
|
~source_texture();
|
|
source_texture(streamfx::obs::source child, streamfx::obs::source parent);
|
|
|
|
public /*copy*/:
|
|
source_texture(source_texture const& other) = delete;
|
|
source_texture& operator=(source_texture const& other) = delete;
|
|
|
|
public /*move*/:
|
|
source_texture(source_texture&& other) = delete;
|
|
source_texture& operator=(source_texture&& other) = delete;
|
|
|
|
public:
|
|
std::shared_ptr<streamfx::obs::gs::texture> render(std::size_t width, std::size_t height);
|
|
|
|
public: // Unsafe Methods
|
|
void clear();
|
|
|
|
obs_source_t* get_object();
|
|
obs_source_t* get_parent();
|
|
};
|
|
} // namespace streamfx::gfx
|