Minor documentation additions.
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m19s
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m19s
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
namespace JGL
|
||||
{
|
||||
using namespace J3ML;
|
||||
/// Represents a 3-channel color value, with Red, Green and Blue components.
|
||||
class Color3 {
|
||||
public:
|
||||
u8 r;
|
||||
@@ -12,16 +13,27 @@ namespace JGL
|
||||
u8 b;
|
||||
|
||||
public:
|
||||
/// Explicitly constructs a Color3 from the given Red, Green, and Blue values.
|
||||
Color3(u8 R, u8 G, u8 B);
|
||||
/// Returns a Color3 parsed from the given hexadecimal string.
|
||||
static Color3 FromHex(const std::string& hexCode);
|
||||
public:
|
||||
/// Returns a Color3 that is somewhere in-between this and the given Color3, determined by the alpha [0-1].
|
||||
Color3 Lerp(const Color3& rhs, float alpha) const;
|
||||
|
||||
/// Returns the red channel [0-255].
|
||||
u8 RedChannel () const;
|
||||
/// Returns the green channel [0-255].
|
||||
u8 GreenChannel() const;
|
||||
/// Returns the blue channel [0-255].
|
||||
u8 BlueChannel () const;
|
||||
/// Returns the red channel normalized from [0-255] to [0-1].
|
||||
float RedChannelNormalized () const;
|
||||
float BlueChannelNormalized() const;
|
||||
/// Returns the green channel normalized from [0-255] to [0-1].
|
||||
float GreenChannelNormalized() const;
|
||||
/// Returns the blue channel normalized from [0-255] to [0-1].
|
||||
float BlueChannelNormalized() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@@ -4,6 +4,8 @@
|
||||
|
||||
namespace JGL
|
||||
{
|
||||
|
||||
/// Represents a 4-channel color value, with Red, Green, Blue, and Alpha components.
|
||||
class Color4 {
|
||||
public:
|
||||
u8 r;
|
||||
|
@@ -6,14 +6,15 @@
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
|
||||
// LMFAO
|
||||
|
||||
/// Defines external C references to FreeType Data Structures
|
||||
extern "C" typedef struct FT_FaceRec_* FT_Face;
|
||||
extern "C" typedef struct FT_LibraryRec_* FT_Library;
|
||||
|
||||
namespace JGL
|
||||
{
|
||||
|
||||
/// Initializes FreeType engine.
|
||||
/// Initializes FreeType engine. Remember to call this during program initialization.
|
||||
bool InitTextEngine();
|
||||
|
||||
/// A Font class implementation.
|
||||
|
@@ -401,7 +401,7 @@ namespace JGL {
|
||||
wasTexture2DEnabled = false,
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
//TODO We won't always want this but for now we do.
|
||||
// TODO: implement bool drawBackface as DrawString parameter.
|
||||
wasCullFaceEnabled = false;
|
||||
if (glIsEnabled(GL_CULL_FACE))
|
||||
wasCullFaceEnabled = true,
|
||||
|
Reference in New Issue
Block a user