Redacted d2497d64a2
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 2m35s
Performance Optimization
Draw points can accept multiple colors.

Draw points now uses vbos.

Allowed the user to set the usage hint for the VBO.

When changing data in a vbo, the data will be orphaned if the mode is not Fixed.
2025-04-20 04:30:29 -04:00
2024-01-19 14:23:02 -05:00
2025-04-20 04:30:29 -04:00
2025-04-20 04:30:29 -04:00
2024-11-12 11:31:18 -05:00
2025-04-17 13:33:08 -04:00
2024-11-12 11:31:18 -05:00
2025-04-18 12:00:51 -04:00
2025-02-04 15:51:52 -05:00

Josh's Graphics Library

Yet Another C++ Rendering Toolkit

License: Unlicense Static Badge

Features

  • Modern C++ (20).
  • Cross Platform (Linux & Windows 10 1909 or newer).
  • Provides single-function-calls to render various graphics in 2D and 3D.
  • Integrates right into an existing OpenGL rendering system.
  • Quick Rendering of Text, Shapes, Sprites / Textures, etc.
  • High-performance text rendering.
  • Little-to-no overhead.

API Overview

J2D

  • DrawPoint
  • DrawLine / DrawGradientLine / DrawDottedLine / DrawDashedLine / DrawLines
  • DrawSprite / DrawPartialSprite
  • DrawRenderTarget / DrawPartialRenderTarget
  • OutlineRect / OutlineRoundedRect / OutlineChamferRect
  • FillRect / FillGradientRect / FillRoundedRect / FillChamferRect
  • OutlineCircle / FillCircle
  • OutlineTriangle / FillTriangle / FillGradientTriangle
  • DrawString
  • DrawCubicBezierCurve
  • DrawArc
  • OutlineEllipse / FillEllipse

J3D

  • DrawLine
  • DrawString
  • DrawMatrixGizmo (WIP)
  • DrawAxisAngleGizmo (WIP)
  • DrawQuaternionGizmo (WIP)

Types

  • RenderTarget
  • VRamList
  • Texture
  • Font

Usage

// Makes sure the glViewport will be the correct size.
// Typically done once per frame.
JGL::Update(window_size);

JGL::J2D::Begin();
    JGL::J2D::FillRect(Colors::Blue, {0,0}, {16,16});
JGL::J2D::End();

// See the example program in main.cpp for more in-depth usage.

Requirements

An OpenGL 2.1 or newer accelerator with at-least two texture mappers that supports the GL_ARB_framebuffer_object extension or an implementation that can provide those features through alternative means (common on ArmSoC and Risc-V).

Compatability

  • AMD ✓
  • NVIDIA ✓
  • Intel ✓
  • Zink (OpenGL-on-Vulkan) ✓
  • GL4ES ✓

Documentation

Documentation is available here.

Contributing

Contributions to JGL are welcome! If you find a bug, have a feature request, or would like to contribute code, please submit an issue or pull request to our repository!

Acknowledgements

JGL is developed and maintained by Josh O'Leary @ Co from Redacted Software and contributors. Special thanks to Redacted.

Description
No description provided
Readme 4.2 MiB
Prerelease-2 Latest
2024-02-20 04:46:32 -05:00
Languages
C++ 79.3%
C 19.7%
GLSL 0.8%
CMake 0.2%