Writing JGL library interface
This commit is contained in:
@@ -26,7 +26,18 @@ namespace JGL {
|
||||
int b;
|
||||
};
|
||||
namespace Colors {
|
||||
|
||||
static const Color3 BrightRed {255, 0, 0};
|
||||
static const Color3 BrightGreen { 0, 255, 0};
|
||||
static const Color3 BrightBlue { 0, 0, 255};
|
||||
static const Color3 White {255, 255, 255};
|
||||
static const Color3 Black { 0, 0, 0};
|
||||
static const Color3 Gray {128, 128, 128};
|
||||
static const Color3 DarkGray {192, 192, 192};
|
||||
static const Color3 LightGray { 64, 64, 64};
|
||||
static const Color3 Maroon {};
|
||||
static const Color3 Fuchsia {};
|
||||
static const Color3 Lime {};
|
||||
static const Color3 Olive {};
|
||||
}
|
||||
struct HSV {
|
||||
float hue;
|
||||
@@ -37,6 +48,12 @@ namespace JGL {
|
||||
Vector2 ScreenToViewport(const Vector2& v)
|
||||
{
|
||||
// TODO: Implement matrix transformation
|
||||
float x = v.x / 600.f;
|
||||
float y = v.y / 600.f;
|
||||
|
||||
return {
|
||||
x - .5f, y - .5f
|
||||
};
|
||||
}
|
||||
Vector2 ViewportToScreen(const Vector2& v)
|
||||
{
|
||||
|
Reference in New Issue
Block a user