Skip to content

Releases: AlexanderJCS/JANGL

6.1.1 - Camera Inconsistencies Fix

07 Jan 04:04

Choose a tag to compare

6.1.1 - Camera Inconsistencies Fix

Bugfixes

  • Zooming and rotating the camera should "feel" a lot more consistent, using techniques applied to the Transform object in version 6.0.0.
  • Fix objects that do not obey the camera incorrectly being culled if the camera is too zoomed in

6.1.0 - Window Resizing

06 Jan 03:31

Choose a tag to compare

  • Allow the window to be resized using Window.setResizable(boolean)
  • Slight code refactor / reformatting

Bugfixes:

  • Fix Transform.setWidth() and Transform.setHeight() scaling both the X and Y axes

6.0.0 - Automatic Memory Management

24 Dec 02:38

Choose a tag to compare

6.0.0 - Automatic Memory Management

Breaking Changes

JANGL class

  • Rename from JANGL to Jangl, since there may be some confusion with JANGL being a constant instead of a class.

Image class

  • Rework the image class:
    • Allow the image to accept any Shape, instead of a Rect
    • Allow the image to accept up to two Bindables.

Text class

  • Introduce a TextBuilder
    • Text must be created with a TextBuilder class.
  • Text.getBatch() is private

TextureBuilder class

  • TextureBuilder.setFilterMode() takes in a jangl.graphics.textures.enums.FilterMode object instead of an integer.
  • Textures now use smooth scaling (linear filter mode) by default instead of pixelated scaling (nearest filter mode)

Transform class

  • Remove deprecated methods
  • Re-do how Transforms work to make it more intuitive
  • Remove Transform.rotateAround(), Transform.rotateRelative(), and Transform.rotateOrigin() for a single Transform.rotate() method, which only rotates around the object's center.

Shape classes

  • Remove Rect.setWidth() and Rect.setHeight() in lieu of Transform.setScaleX() and Transform.setScaleY()
  • Remove Circle.setRadius() in lieu of transform scaling

Model Class

  • Remove Model.setVertices(). Instead, manipulate the model with a Transform class, substitute the vertices, or create a new Model class.

ColorFactory class

  • Change "Normalized" in method names to "Norm". E.g., fromNormalized() is now fromNorm()

Backwards Compatible Changes

Memory Management

  • All objects are now automatically freed when the garbage collector runs, so calling .close() at the end of an object's lifespan is not required. However, it is still recommended to call to prevent strain on the garbage collector.

Builder classes

  • For builders, add a .toObject() method (e.g., TextureBuilder.toTexture(), BatchBuilder.toBatch())

ColorFactory class

  • Add from255HSVA() method

Sound class

  • Change the pitch and speed of a sound using Sound.setPitchAndSpeed(float). You can also access the current set value using Sound.getPitchAndSpeed().

TextureBuilder class

  • Add TextureBuilder.setWrapMode(WrapMode), along with a new jangl.graphics.textures.enums.WrapMode object
  • Add a shortcut for TextureBuilder.setImagePath(pathstr): new TextureBuilder(pathstr)

Coordinates classes

  • Add a PixelCoords and WorldCoords copy constructor

Text class

  • Add a yCutoff value, that can be set in the text factory
  • Add a wrapWidth value, that can be set in the text factory.

Bugfixes

  • Model.getDrawCallCount() works correctly
  • Circles take into account scaling when checking for collision
  • Binding points are checked when being added to the shader, instead of at creation of the UBO
  • Remove setting the window to the center of the screen due to scaling issues when the application is opened on a secondary monitor with a different resolution to the primary monitor.

5.1.4 - Smooth Texture Scaling

11 Nov 19:23

Choose a tag to compare

5.1.4 - Smooth Texture Scaling

Smooth Scaling

Fonts

Fonts use linear texture scaling by default, instead of nearest texture scaling. This allows for better-looking text, but pixelated and retro fonts may look bad. If your font looks bad, you can manually go back to linear scaling.

  • Add Font.setPixelatedScaling()
  • Add Font.setSmoothScaling()
  • Add Font.setFilterMode(int)

(commit)

TextureBuilder

Texture builders now have two new methods. By default, TextureBuilder uses nearest scaling. To use linear scaling, use TextureBuilder.setSmoothScaling().

  • Add TextureBuilder.setSmoothScaling()
  • Add TextureBuilder.setLinearScaling()

(commit)

Textures

Textures can change their filter mode after creation.

  • Add Texture.setSmoothScaling()
  • Add Texture.setPixelatedScaling()
  • Add Texture.setFilterMode(int)

(commit)

Bugfixes

5.1.3 - `Rect.setHeight()` hotfix

07 Nov 23:40

Choose a tag to compare

  • Fix Rect.setHeight(). Before, it was not actually setting the height of the rectangle.

5.1.2 - Vertex Shader Precompilation Overhaul

01 Oct 00:21

Choose a tag to compare

5.1.2 - Vertex Shader Precompilation Overhaul

  • Overhaul how vertex shader precompilation works. This should make it work better and produce less erroneous vertex shader code.
  • Fix Window.getScreenWidth() and Window.getScreenHeight() returning incorrect values when the desired window size is smaller than what the operating system will allow.
  • Make Sound error messages more useful

5.1.1 - Memory Leak Hotfix

20 Aug 17:08

Choose a tag to compare

5.1.1 - Memory Leak Fix

Bugfixes

  • Fix the model class freeing an incorrect portion of memory, which leads to unintended behavior and potentially a memory leak.

Gradle

  • Switch to a Gradle build system
  • All demos and guide code are now inside src/test/java because IntelliJ doesn't like it otherwise

5.1.0 - Text Justification

18 Aug 02:58

Choose a tag to compare

5.1.0 - Text Justification

Additions

  • Add the jangl.graphics.font.Justify enum, which has values LEFT, CENTER, and RIGHT
  • Add Text justification. You can specify text Justification using the Text(WorldCoords, Font, float, String, Justify)
  • The window centers itself on the primary monitor upon initialization

Fixes

  • Coords.sub() and Coords.div() take in a Coords object instead of a WorldCoords object
  • Fix ShaderProgram.init() re-initializing when being called again, instead of checking if it is already initialized and exiting silently if so

5.0.3 - Culling Fix and UBO binding point changes

16 Aug 01:13

Choose a tag to compare

5.0.3 - Culling Fix and UBO binding point changes

Changes

  • Add static method UBO.getMaxBindingPoint()
  • UBO throws an exception when the binding point is over the hardware's maximum binding point instead of an arbitrary limit of 84
  • The Window class can be initialized using the ratio of the application's height to the primary monitor's height and the aspect ratio of the window. You can initialize it by using JANGL.init(float heightRatio, float aspectRatio)

Fixes

  • The UBO containing the view and projection matrices are set to the maximum binding point for the specific hardware, so this is guaranteed to work on all hardware. (hopefully)
  • Fix culling that should not happen when the window's width is less than the window's height
  • Fix glGetError() returning error 1280

5.0.2 - macOS fixes

15 Aug 01:13

Choose a tag to compare

5.0.2 - macOS fixes

This patch allows code using JANGL to go from crashing at startup to running the application. See my note under "known issue" for a caveat to this (issue was fixed in v5.1.1).

Changes

  • Fix shaders not compiling on mac
  • Change the max UBO binding to 74 to be compatible with macOS
  • Rewrite the Model, IndicesModel, and TexturedModel class to include VAOs

Known Issue

  • FIXED in v5.1.1: Sometimes the model matrix for objects can be in an incorrect location for newly-instantiated objects only when there are already several hundred (if not thousands) of objects already on the screen. As far as I can tell, this is not reproducible.