DrawSprite
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m21s

This commit is contained in:
2024-07-18 22:24:19 -04:00
parent 4be97f52d9
commit eca4309e85
7 changed files with 80 additions and 23 deletions

10
include/JGL/Inversion.h Normal file
View File

@@ -0,0 +1,10 @@
#pragma once
#include <J3ML/J3ML.h>
namespace JGL {
enum class Inversion : u8 {
None = 0,
Vertical = 1,
Horizontal = 2,
Both = 3
};
}

View File

@@ -16,6 +16,7 @@
#include <iostream>
#include <JGL/Color4.h>
#include <JGL/Gradient.h>
#include <JGL/Inversion.h>
#include <JGL/FontCache.h>
#include <JGL/Font.h>
#include <J3ML/LinearAlgebra.h>
@@ -102,8 +103,8 @@ namespace JGL {
void OutlineRect(const Color3& color, const Vector2& pos, const Vector2& size, float thickness = 1);
///Draws a sprite to the screen.
void DrawSprite(GLuint texture, const Vector2& pos, const Vector2& size);
void DrawSprite(GLuint texture, float x, float y, float w, float h);
void DrawSprite(GLuint texture, const Vector2& pos, const Vector2& size, u8 opacity = 255, Inversion inversion = Inversion::None);
void DrawSprite(GLuint texture, float x, float y, float w, float h, u8 opacity = 255, Inversion inversion = Inversion::None);
/// Draws a filled rectangle on the screen.
void FillRect(const Color4& color, const Vector2& pos, const Vector2& size);