obs-StreamFX/source/gfx/gfx-source-texture.hpp

45 lines
1.2 KiB
C++
Raw Normal View History

// 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"
2021-06-08 02:47:04 +00:00
namespace streamfx::gfx {
class source_texture {
streamfx::obs::source _parent;
streamfx::obs::source _child;
2021-06-08 02:38:24 +00:00
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:
2021-06-08 02:38:24 +00:00
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();
};
2021-06-08 02:47:04 +00:00
} // namespace streamfx::gfx