obs-StreamFX/source/obs/gs/gs-rendertarget.hpp
Michael Fabian 'Xaymar' Dirks 5a3954ae0e project: Fix License, License headers and Copyright information
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.
2023-04-05 18:59:08 +02:00

65 lines
1.8 KiB
C++

// AUTOGENERATED COPYRIGHT HEADER START
// Copyright (C) 2019-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
// Copyright (C) 2022 lainon <GermanAizek@yandex.ru>
// AUTOGENERATED COPYRIGHT HEADER END
#pragma once
#include "common.hpp"
#include "gs-texture.hpp"
namespace streamfx::obs::gs {
class rendertarget_op;
class rendertarget {
friend class rendertarget_op;
protected:
gs_texrender_t* _render_target;
bool _is_being_rendered;
gs_color_format _color_format;
gs_zstencil_format _zstencil_format;
public:
~rendertarget();
rendertarget(gs_color_format colorFormat, gs_zstencil_format zsFormat);
gs_texture_t* get_object();
std::shared_ptr<streamfx::obs::gs::texture> get_texture();
void get_texture(streamfx::obs::gs::texture& tex);
void get_texture(std::shared_ptr<streamfx::obs::gs::texture>& tex);
void get_texture(std::unique_ptr<streamfx::obs::gs::texture>& tex);
gs_color_format get_color_format();
gs_zstencil_format get_zstencil_format();
streamfx::obs::gs::rendertarget_op render(uint32_t width, uint32_t height);
streamfx::obs::gs::rendertarget_op render(uint32_t width, uint32_t height, gs_color_space cs);
};
class rendertarget_op {
streamfx::obs::gs::rendertarget* parent;
public:
~rendertarget_op();
rendertarget_op(streamfx::obs::gs::rendertarget* rt, uint32_t width, uint32_t height);
rendertarget_op(streamfx::obs::gs::rendertarget* rt, uint32_t width, uint32_t height, gs_color_space cs);
// Move Constructor
rendertarget_op(streamfx::obs::gs::rendertarget_op&&) noexcept;
// Copy Constructor
rendertarget_op(const streamfx::obs::gs::rendertarget_op&) = delete;
rendertarget_op& operator=(const streamfx::obs::gs::rendertarget_op& r) = delete;
};
} // namespace streamfx::obs::gs