obs-StreamFX/source/gfx/gfx-util.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

41 lines
1.3 KiB
C++

// AUTOGENERATED COPYRIGHT HEADER START
// Copyright (C) 2022-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
// AUTOGENERATED COPYRIGHT HEADER END
#pragma once
#include "obs/gs/gs-effect.hpp"
#include "obs/gs/gs-vertexbuffer.hpp"
#include "warning-disable.hpp"
#include <memory>
#include "warning-enable.hpp"
namespace streamfx::gfx {
class util {
std::shared_ptr<::streamfx::obs::gs::effect> _effect;
std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _point_vb;
std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _line_vb;
std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _arrow_vb;
std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _quad_vb;
std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _fstri_vb;
public /* Singleton */:
static std::shared_ptr<streamfx::gfx::util> get();
private:
util();
public:
~util();
void draw_point(float x, float y, uint32_t color = 0xFFFFFFFF);
void draw_line(float x, float y, float x2, float y2, uint32_t color = 0xFFFFFFFF);
void draw_arrow(float x, float y, float x2, float y2, float w = 0., uint32_t color = 0xFFFFFFFF);
void draw_rectangle(float x, float y, float w, float h, bool frame, uint32_t color = 0xFFFFFFFF);
void draw_fullscreen_triangle();
};
} // namespace streamfx::gfx