Josh's Graphics Library
JGL.h
Go to the documentation of this file.
1
7
11
12
13#pragma once
14
15#include <string>
16#include <Color4.hpp>
17#include <JGL/types/Texture.h>
18#include <JGL/types/Enums.h>
19#include <JGL/types/FontCache.h>
20#include <JGL/types/Font.h>
22#include <JGL/types/Light.h>
23#include <J3ML/LinearAlgebra.hpp>
24#include <J3ML/LinearAlgebra/Vector2.hpp>
25#include <J3ML/LinearAlgebra/Vector3.hpp>
26#include <J3ML/Geometry/Sphere.hpp>
27#include <J3ML/Geometry/Capsule.hpp>
28#include <J3ML/Geometry/Triangle2D.hpp>
29
31namespace JGL {
32 using namespace J3ML::LinearAlgebra;
33 using namespace J3ML::Geometry;
34
35
37 void Update(const Vector2& window_size);
39 std::array<GLfloat, 16> OpenGLPerspectiveProjectionRH(float fovY, float aspect, float z_near, float z_far);
41 bool MeetsRequirements();
43 namespace J2D {
50 void Begin(RenderTarget* render_target = nullptr, bool clear_buffers = false);
53 void End();
56 void LightArray(Light*, size_t size);
57 void LightArray(std::vector<Light> lights);
58
63 void DrawPoint(const Color4& color, const Vector2& coordinates, float radius = 1.f);
64 void DrawPoint(const Color4& color, float x, float y, float radius = 1.f);
65
71 void DrawPoints(const Color4& color, const Vector2* points, int num_points, float radius = 1.f);
72
78 void DrawLine(const Color4& color, const Vector2& A, const Vector2& B, float thickness = 1);
79 void DrawLine(const Color4& color, float x1, float y1, float x2, float y2, float thickness = 1);
80
87 void DrawGradientLine(const Color4& color_a, const Color4& color_b, const Vector2& A, const Vector2& B, float thickness = 1);
88 void DrawGradientLine(const Color4& color_a, const Color4& color_b, float x, float y, float w, float h, float thickness = 1);
89
95 void OutlineRect(const Color4& color, const Vector2& pos, const Vector2& size, float thickness = 1);
96
103 void OutlineRoundedRect(const Color4& color, const Vector2& pos, const Vector2& size, float radius = 5, float thickness = 1);
104
111 void OutlineChamferRect(const Color4& color, const Vector2& pos, const Vector2& size, float radius = 5, float thickness = 1);
112
118 void FillRect(const Color4& color, const Vector2& pos, const Vector2& size);
119
126 void FillGradientRect(const Color4& color1, const Color4& color2, const Direction& gradient, const Vector2& pos, const Vector2& size);
127
134 void FillRoundedRect(const Color4& color, const Vector2& pos, const Vector2& size, float radius = 5, unsigned int subdivisions = 8);
135
141 void FillChamferRect(const Color4& color, const Vector2& pos, const Vector2& size, float radius = 5);
142
151 void DrawRenderTarget(const RenderTarget& render_target, const Vector2& position, float rad_rotation = 0, const Vector2& origin = Vector2(0 , 0),
152 const Vector2& scale = Vector2(1, 1), const Color4& color = Colors::White, Direction inversion = Direction::None);
153 void DrawRenderTarget(const RenderTarget* render_target, const Vector2& position, float rad_rotation = 0, const Vector2& origin = Vector2(0 , 0),
154 const Vector2& scale = Vector2(1, 1), const Color4& color = Colors::White, Direction inversion = Direction::None);
155
166 void DrawSprite(const RenderTarget& render_target, const Vector2& position, float rad_rotation = 0, const Vector2& origin = Vector2(0 , 0),
167 const Vector2& scale = Vector2(1, 1), const Color4& color = Colors::White, Direction inversion = Direction::None);
168 void DrawSprite(const RenderTarget* render_target, const Vector2& position, float rad_rotation = 0, const Vector2& origin = Vector2(0 , 0),
169 const Vector2& scale = Vector2(1, 1), const Color4& color = Colors::White, Direction inversion = Direction::None);
170
180 void DrawSprite(const Texture& texture, const Vector2& position, float rad_rotation = 0, const Vector2& origin = Vector2(0,0),
181 const Vector2& scale = Vector2(1,1), const Color4& color = Colors::White, Direction inversion = Direction::None);
182 void DrawSprite(const Texture* texture, const Vector2& position, float rad_rotation = 0, const Vector2& origin = Vector2(0,0),
183 const Vector2& scale = Vector2(1,1), const Color4& color = Colors::White, Direction inversion = Direction::None);
184 void DrawSprite(const Texture& texture, float positionX, float positionY, float rad_rotation = 0, float originX = 0, float originY = 0,
185 float scaleX = 1, float scaleY = 1, const Color4& color = Colors::White, Direction inversion = Direction::None);
186 void DrawSprite(const Texture* texture, float positionX, float positionY, float rad_rotation = 0,
187 float originX = 0, float originY = 0,float scaleX = 1, float scaleY = 1,
188 const Color4& color = Colors::White, Direction inversion = Direction::None);
189
199 void DrawPartialSprite(const Texture& texture, const Vector2& position, const Vector2& sub_texture_position, const Vector2& sub_texture_size, float rad_rotation = 0,
200 const Vector2& origin = Vector2(0,0), const Vector2& scale = Vector2(1, 1), const Color4& color = Colors::White, Direction inversion = Direction::None);
201 void DrawPartialSprite(const Texture* texture, const Vector2& position, const Vector2& sub_texture_position, const Vector2& sub_texture_size, float rad_rotation = 0,
202 const Vector2& origin = Vector2(0,0), const Vector2& scale = Vector2(1, 1), const Color4& color = Colors::White, Direction inversion = Direction::None);
203 void DrawPartialSprite(const Texture& texture, float positionX, float positionY, float sub_texture_positionX, float sub_texture_positionY, unsigned int sub_texture_sizeX, unsigned int sub_texture_sizeY,
204 float rad_rotation = 0, float originX = 0, float originY = 0, float scaleX = 1, float scaleY = 1, const Color4& color = Colors::White, Direction inversion = Direction::None);
205 void DrawPartialSprite(const Texture* texture, float positionX, float positionY, float sub_texture_positionX, float sub_texture_positionY, unsigned int sub_texture_sizeX, unsigned int sub_texture_sizeY,
206 float rad_rotation = 0, float originX = 0, float originY = 0, float scaleX = 1, float scaleY = 1, const Color4& color = Colors::White, Direction inversion = Direction::None);
207
217 void DrawMirrorSprite(const Texture& texture, const Vector2& position, Direction mirror_axis = Direction::Horizontal | Direction::Vertical, float rad_rotation = 0, const Vector2& origin = Vector2(0,0), const Vector2& scale = Vector2(1,1), const Color4& color = Colors::White);
218 void DrawMirrorSprite(const Texture* texture, const Vector2& position, Direction mirror_axis = Direction::Horizontal | Direction::Vertical, float rad_rotation = 0, const Vector2& origin = Vector2(0,0), const Vector2& scale = Vector2(1,1), const Color4& color = Colors::White);
219
226 void OutlineCircle(const Color4& color, const Vector2& center, float radius, unsigned int subdivisions = 16, float thickness = 1);
227
233 void FillCircle(const Color4& color, const Vector2& center, float radius, unsigned int subdivisions = 8);
234
239 void OutlineTriangle(const Color4& color, const Triangle2D& tri, float thickness = 1);
240 void OutlineTriangle(const Color4& color, const Vector2& triA, const Vector2& triB, const Vector2& triC, float thickness = 1);
241
245 void FillTriangle(const Color4& color, const Triangle2D& tri);
246 void FIllTriangle(const Color4& color, const Vector2& triA, const Vector2& triB, const Vector2& triC);
247
253 void FillGradientTriangle(const Color4& a_color, const Color4& b_color, const Color4& c_color, const Triangle2D& tri);
254 void FillGradientTriangle(const Color4& a_color, const Color4& b_color, const Color4& c_color, const Vector2& tri_a, const Vector2& tri_b, const Vector2& tri_c);
255
265 void DrawCubicBezierCurve(const Color4& color, const Vector2& controlA, const Vector2& pointA, const Vector2& pointB, const Vector2& controlB,
266 int subdivisions = 10, float thickness = 1);
267
268
269 // TODO: Implement OutlinePolygon overload which takes a std::vector of points as well.
270
276 void OutlinePolygon(const Color4& color, const Vector2* points, int points_size, float thickness = 1);
277
286 void DrawString(const Color4& color, const std::string& text, float x, float y, float scale, u32 size, const Font& font);
287
288
297 void DrawArc(const Color4& color, const Vector2& center, float radius, float arc_begin, float arc_end,
298 unsigned int subdivisions, float thickness);
299
300
302 void FillPolygon(const Color4& color, const std::vector<Vector2>& points);
303
304 void OutlineEllipse(const Color4& color, const Vector2& position, float radius_x, float radius_y, float thickness = 1, int subdivisions = 8);
305 void FillEllipse(const Color4& color, const Vector2& position, float radius_x, float radius_y, int subdivisions = 8);
306 }
307
309 namespace J3D {
310
312 void Init(const Vector2 &window_size, float fov, float far_plane);
313
315 void ChangeFOV(float fov);
316
318 void ChangeFarPlane(float far_plane);
319
324 void Begin();
325
328 void End();
329
330
331 void SetMatrix(const std::vector<GLfloat> &matrix, const Vector2 &window_size);
332
338 void DrawLine(const Color4& color, const Vector3& A, const Vector3& B, float thickness = 1.f);
339
340
350 void DrawCubicBezierCurve(const Color4& color, const Vector3& controlA, const Vector3& pointA, const Vector3& pointB, const Vector3& controlB,
351 int subdivisions = 10, float thickness = 1);
352
358 void WireframeIcosahedron(const Color4& color, const Vector3& position, float radius, float thickness = 1.f);
359
360
365 void FillIcosahedron(const Color4& color, const Vector3& position, float radius);
366
374 void WireframeSphere(const Color4& color, const Vector3& position, float radius, float thickness = 1.f, uint sectors = 10, uint stacks = 10);
375
382 void WireframeSphere(const Color4& color, const Sphere& sphere, float thickness = 1.f, uint sectors = 10, uint stacks = 10);
383
391 void WireframeIcosphere(const Color4& color, const Vector3& position, float radius, float thickness = 1.f, unsigned int subdivisions = 10);
392
399 void WireframeIcosphere(const Color4& color, const Sphere& sphere, float thickness = 1.f, unsigned int subdivisions = 10);
400
408 void WireframeCubesphere(const Color4& color, const Vector3& position, float radius, float thickness = 1.f, unsigned int subdivisions = 10);
409
416 void WireframeCubesphere(const Color4& color, const Sphere& sphere, float thickness = 1.f, unsigned int subdivisions = 10);
417
424 void FillSphere(const Color4& color, const Vector3& position, float radius, uint sectors = 10, uint stacks = 10);
425
431 void FillSphere(const Color4& color, const Sphere& sphere, uint sectors = 10, uint stacks = 10);
432
439 void FillIcosphere(const Color4& color, const Vector3& position, float radius, unsigned int subdivisions = 10);
440
446 void FillIcosphere(const Color4& color, const Sphere& sphere, unsigned int subdivisions = 10);
447
454 void FillCubesphere(const Color4& color, const Vector3& position, float radius, unsigned int subdivisions = 10);
455
461 void FillCubesphere(const Color4& color, const Sphere& sphere, unsigned int subdivisions = 10);
462
468 void WireframeAABB(const Color4& color, const Vector3& pos, const Vector3& radii, float thickness = 1.f);
469
473 void WireframeAABB(const Color4& color, const AABB& aabb, float thickness = 1.f);
474
479 void FillAABB(const Color4& color, const Vector3& pos, const Vector3& radii);
480
484 void FillAABB(const Color4& color, const AABB& aabb);
485
492 void WireframeOBB(const Color4& color, const Vector3& position, const Vector3& radii, const EulerAngle& orientation, float thickness = 1.f);
493
498 void WireframeOBB(const Color4& color, const OBB& obb, float thickness = 1.f);
499
505 void FillOBB(const Color4& color, const Vector3& position, const Vector3& radii, const EulerAngle& orientation);
506
510 void FillOBB(const Color4& color, const OBB& obb);
511
515 void FillPrism();
517 void FillPipe();
519 void FillCone();
521 void FillTorus();
522
523
524 void FillCapsule(const Color3& color, const Capsule& capsule);
525 void WireframeCapsule(const Color3& color, const Capsule& cap, float thickness = 1.f);
526 void FillTriangleMesh(const Color3& color, const TriangleMesh& mesh);
527 void WireframeTriangleMesh(const Color3& color, const TriangleMesh& mesh, float thickness = 1.f);
528
538 void DrawString(const Color4& color, const std::string& text, const Vector3& pos, float scale, u32 size, const Font& font, const EulerAngle& angle = {0, 0, 0}, bool draw_back_face = false);
539
542
545
547 void DrawMatrixGizmo (const Matrix3x3&, const Vector3&);
548 void DrawMatrixGizmo (const Matrix4x4&);
549 void DrawAxisAngleGizmo (const AxisAngle&, const Vector3&);
550 void DrawQuaternionGizmo (const Quaternion&, const Vector3&);
551 }
552}
JGL::RenderTarget * render_target
Definition: JGL.cpp:14
void purgeCache()
Definition: FontCache.cpp:94
A Font class implementation.
Definition: Font.h:22
Definition: Light.h:12
Definition: RenderTarget.h:13
Represents texture data loaded on the GPU. Contains a handle that can be passed to OpenGL draw calls.
Definition: Texture.h:27
void FillChamferRect(const Color4 &color, const Vector2 &pos, const Vector2 &size, float radius=5)
Draws a filled rectangle with chamfered (beveled) corners on the screen.
Definition: JGL.cpp:850
void FillPolygon(const Color4 &color, const std::vector< Vector2 > &points)
TODO Implement the following. These ones are going to be extremely annoying.
void DrawCubicBezierCurve(const Color4 &color, const Vector2 &controlA, const Vector2 &pointA, const Vector2 &pointB, const Vector2 &controlB, int subdivisions=10, float thickness=1)
Draws a smooth, curved line segment between two control points, with the curve controlled by the two ...
Definition: JGL.cpp:716
void FillCircle(const Color4 &color, const Vector2 &center, float radius, unsigned int subdivisions=8)
Draws a filled circle on the screen.
Definition: JGL.cpp:645
void FillGradientTriangle(const Color4 &a_color, const Color4 &b_color, const Color4 &c_color, const Triangle2D &tri)
Fills a triangle defined by the provided vertices with a gradient that transitions smoothly between t...
Definition: JGL.cpp:698
void DrawPoint(const Color4 &color, const Vector2 &coordinates, float radius=1.f)
Plots a single pixel on the screen.
Definition: JGL.cpp:180
void DrawString(const Color4 &color, const std::string &text, float x, float y, float scale, u32 size, const Font &font)
Draws a text string on the screen with a given point-size and font.
Definition: TextRendering.cpp:97
void OutlineChamferRect(const Color4 &color, const Vector2 &pos, const Vector2 &size, float radius=5, float thickness=1)
Draws an outline of a rectangle with chamfered corners onto the screen.
Definition: JGL.cpp:854
void OutlinePolygon(const Color4 &color, const Vector2 *points, int points_size, float thickness=1)
Draws a series of points where the last point always connects to the first point.
Definition: JGL.cpp:734
void Begin(RenderTarget *render_target=nullptr, bool clear_buffers=false)
Open a 2-D rendering context with the underlying graphics system (In this case& by default OpenGL).
Definition: JGL.cpp:51
void FillRect(const Color4 &color, const Vector2 &pos, const Vector2 &size)
Draws a filled rectangle on the screen.
Definition: JGL.cpp:245
void End()
Closes a 2-D rendering context with the underlying graphics system (In this case& by default OpenGL).
Definition: JGL.cpp:138
void DrawPartialSprite(const Texture &texture, const Vector2 &position, const Vector2 &sub_texture_position, const Vector2 &sub_texture_size, float rad_rotation=0, const Vector2 &origin=Vector2(0, 0), const Vector2 &scale=Vector2(1, 1), const Color4 &color=Colors::White, Direction inversion=Direction::None)
Draws a piece of a sprite to the screen, similar to DrawSprite.
Definition: JGL.cpp:447
void FillGradientRect(const Color4 &color1, const Color4 &color2, const Direction &gradient, const Vector2 &pos, const Vector2 &size)
Draws a filled rectangle where the color transitions across it.
Definition: JGL.cpp:256
void OutlineEllipse(const Color4 &color, const Vector2 &position, float radius_x, float radius_y, float thickness=1, int subdivisions=8)
Definition: JGL.cpp:892
void OutlineCircle(const Color4 &color, const Vector2 &center, float radius, unsigned int subdivisions=16, float thickness=1)
Draws an outline of a circle on the screen.
Definition: JGL.cpp:618
void LightArray(Light *, size_t size)
Provide a list of lights to be used in 2D space.
void FillEllipse(const Color4 &color, const Vector2 &position, float radius_x, float radius_y, int subdivisions=8)
Definition: JGL.cpp:920
void OutlineRect(const Color4 &color, const Vector2 &pos, const Vector2 &size, float thickness=1)
Draws an outline of a rectangle on the screen.
Definition: JGL.cpp:232
void DrawSprite(const RenderTarget &render_target, const Vector2 &position, float rad_rotation=0, const Vector2 &origin=Vector2(0, 0), const Vector2 &scale=Vector2(1, 1), const Color4 &color=Colors::White, Direction inversion=Direction::None)
Draws a sprite (technically, actually a render target) to the screen.
Definition: JGL.cpp:348
void DrawGradientLine(const Color4 &color_a, const Color4 &color_b, const Vector2 &A, const Vector2 &B, float thickness=1)
Draws a line with a color gradient that transitions across it.
Definition: JGL.cpp:211
void OutlineRoundedRect(const Color4 &color, const Vector2 &pos, const Vector2 &size, float radius=5, float thickness=1)
Draws an outline of a rectangle with rounded corners onto the screen.
Definition: JGL.cpp:786
void FIllTriangle(const Color4 &color, const Vector2 &triA, const Vector2 &triB, const Vector2 &triC)
Definition: JGL.cpp:881
void DrawMirrorSprite(const Texture &texture, const Vector2 &position, Direction mirror_axis=Direction::Horizontal|Direction::Vertical, float rad_rotation=0, const Vector2 &origin=Vector2(0, 0), const Vector2 &scale=Vector2(1, 1), const Color4 &color=Colors::White)
To save v-ram, Use if a sprite would be identical if mirrored horizontally, vertically,...
Definition: JGL.cpp:535
void DrawLine(const Color4 &color, const Vector2 &A, const Vector2 &B, float thickness=1)
Plots a line (segment) on the screen.
Definition: JGL.cpp:195
void OutlineTriangle(const Color4 &color, const Triangle2D &tri, float thickness=1)
Draws an outline of a triangle on the screen.
Definition: JGL.cpp:673
void FillRoundedRect(const Color4 &color, const Vector2 &pos, const Vector2 &size, float radius=5, unsigned int subdivisions=8)
Draws a filled rectangle with rounded corners on the screen.
Definition: JGL.cpp:289
void DrawPoints(const Color4 &color, const Vector2 *points, int num_points, float radius=1.f)
Plots a series of pixel-points on the screen, in a batch.
Definition: JGL.cpp:873
void DrawArc(const Color4 &color, const Vector2 &center, float radius, float arc_begin, float arc_end, unsigned int subdivisions, float thickness)
Draws an Arc (section of a circle) to the screen.
Definition: JGL.cpp:753
void FillTriangle(const Color4 &color, const Triangle2D &tri)
Draws a filled triangle on the screen.
Definition: JGL.cpp:686
void DrawRenderTarget(const RenderTarget &render_target, const Vector2 &position, float rad_rotation=0, const Vector2 &origin=Vector2(0, 0), const Vector2 &scale=Vector2(1, 1), const Color4 &color=Colors::White, Direction inversion=Direction::None)
Draws a render-target (runtime-modifiable texture) to the screen.
Definition: JGL.cpp:343
void DrawString(const Color4 &color, const std::string &text, const Vector3 &pos, float scale, u32 size, const Font &font, const EulerAngle &angle={0, 0, 0}, bool draw_back_face=false)
Draws a string of text in 3D space, with an arbitrary rotation.
Definition: TextRendering.cpp:165
void WireframeTriangleMesh(const Color3 &color, const TriangleMesh &mesh, float thickness=1.f)
void DrawCubicBezierCurve(const Color4 &color, const Vector3 &controlA, const Vector3 &pointA, const Vector3 &pointB, const Vector3 &controlB, int subdivisions=10, float thickness=1)
Draws a smooth, curved line segment between two control points, with the curve controlled by the two ...
Definition: JGL.cpp:1451
void FillTorus()
void FillAABB(const Color4 &color, const Vector3 &pos, const Vector3 &radii)
Draws a solid axis-aligned bounding box in 3D space.
Definition: JGL.cpp:1297
void Init(const Vector2 &window_size, float fov, float far_plane)
Initializes internals for 3D rendering. Probably will be rethought later.
void FillOBB(const Color4 &color, const Vector3 &position, const Vector3 &radii, const EulerAngle &orientation)
Draws an outline of an oriented bounding box in 3D space.
void FillIcosphere(const Color4 &color, const Vector3 &position, float radius, unsigned int subdivisions=10)
Draws a solid Icosphere in 3D space.
void FillCubesphere(const Color4 &color, const Vector3 &position, float radius, unsigned int subdivisions=10)
Draws a solid Cubesphere in 3D space.
void WireframeIcosahedron(const Color4 &color, const Vector3 &position, float radius, float thickness=1.f)
Draws the outline of an Icosahedron in 3D space.
Definition: JGL.cpp:1187
void ChangeFOV(float fov)
Helper function to conveniently change the Field-Of-View.
Definition: JGL.cpp:973
void FillPrism()
void DrawBillboardString()
Draws a string of text in 3D space that is always facing the exact direction of the camera projection...
void WireframeAABB(const Color4 &color, const Vector3 &pos, const Vector3 &radii, float thickness=1.f)
Draws an outline of an axis-aligned bounding box in 3D space.
Definition: JGL.cpp:1233
void FillCylinder()
void Begin()
Open a 3-D rendering context with the underlying graphics system (In this case& by default OpenGL).
Definition: JGL.cpp:981
void WireframeIcosphere(const Color4 &color, const Vector3 &position, float radius, float thickness=1.f, unsigned int subdivisions=10)
Draws the outline of an Icosphere in 3D space.
Definition: JGL.cpp:1113
void WireframeCubesphere(const Color4 &color, const Vector3 &position, float radius, float thickness=1.f, unsigned int subdivisions=10)
Draws the outline of a Cubesphere in 3D space.
void WireframePipe()
void FillIcosahedron(const Color4 &color, const Vector3 &position, float radius)
Draws a solid Icosahedron in 3D space.
void WireframeOBB(const Color4 &color, const Vector3 &position, const Vector3 &radii, const EulerAngle &orientation, float thickness=1.f)
Draws an outline of an oriented bounding box in 3D space.
void WireframeTorus()
void DrawBillboardSprite()
Draws a texture sprite in 3D space that is always facing the exact direction of the camera projection...
void ChangeFarPlane(float far_plane)
Helper function to change the far-plane, which is the cutoff distance for rendering.
Definition: JGL.cpp:977
void WireframeCone()
void WireframeCapsule(const Color3 &color, const Capsule &cap, float thickness=1.f)
void FillSphere(const Color4 &color, const Vector3 &position, float radius, uint sectors=10, uint stacks=10)
Draws a solid Sphere in 3D space.
Definition: JGL.cpp:1363
void FillCapsule(const Color3 &color, const Capsule &capsule)
void DrawLine(const Color4 &color, const Vector3 &A, const Vector3 &B, float thickness=1.f)
Draws a line in 3D space.
Definition: JGL.cpp:1055
void DrawQuaternionGizmo(const Quaternion &, const Vector3 &)
void DrawMatrixGizmo(const Matrix3x3 &, const Vector3 &)
void FillTriangleMesh(const Color3 &color, const TriangleMesh &mesh)
void DrawAxisAngleGizmo(const AxisAngle &, const Vector3 &)
void FillPipe()
void FillCone()
void SetMatrix(const std::vector< GLfloat > &matrix, const Vector2 &window_size)
void DrawSprite()
void WireframeCylinder()
void End()
Closes a 3-D rendering context with the underlying graphics system (In this case& by default OpenGL).
Definition: JGL.cpp:1031
void WireframePrism()
void WireframeSphere(const Color4 &color, const Vector3 &position, float radius, float thickness=1.f, uint sectors=10, uint stacks=10)
Draws the outline of a Sphere in 3D space.
Definition: JGL.cpp:1068
OpenGL Wrapper for rendering 2D & 3D graphics in both a 2D and 3D context.
Definition: JGL.h:31
bool MeetsRequirements()
Returns true if the graphics driver meets the requirements (GL Version & Extensions).
Definition: JGL.cpp:42
void PurgeFontCache()
Definition: JGL.h:38
void Update(const Vector2 &window_size)
Definition: JGL.cpp:37
std::array< GLfloat, 16 > OpenGLPerspectiveProjectionRH(float fovY, float aspect, float z_near, float z_far)
Definition: JGL.cpp:951
Direction
Definition: Enums.h:4
FontCache fontCache
Definition: FontCache.h:69