Releases: AlexanderJCS/JANGL
Releases · AlexanderJCS/JANGL
6.1.1 - Camera Inconsistencies Fix
6.1.1 - Camera Inconsistencies Fix
Bugfixes
- Zooming and rotating the camera should "feel" a lot more consistent, using techniques applied to the
Transformobject in version6.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
- Allow the window to be resized using
Window.setResizable(boolean) - Slight code refactor / reformatting
Bugfixes:
- Fix
Transform.setWidth()andTransform.setHeight()scaling both the X and Y axes
6.0.0 - Automatic Memory Management
6.0.0 - Automatic Memory Management
Breaking Changes
JANGL class
- Rename from
JANGLtoJangl, since there may be some confusion withJANGLbeing a constant instead of a class.
Image class
- Rework the image class:
- Allow the image to accept any
Shape, instead of aRect - Allow the image to accept up to two
Bindables.
- Allow the image to accept any
Text class
- Introduce a
TextBuilderTextmust be created with aTextBuilderclass.
Text.getBatch()is private
TextureBuilder class
TextureBuilder.setFilterMode()takes in ajangl.graphics.textures.enums.FilterModeobject 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(), andTransform.rotateOrigin()for a singleTransform.rotate()method, which only rotates around the object's center.
Shape classes
- Remove
Rect.setWidth()andRect.setHeight()in lieu ofTransform.setScaleX()andTransform.setScaleY() - Remove
Circle.setRadius()in lieu of transform scaling
Model Class
- Remove
Model.setVertices(). Instead, manipulate the model with aTransformclass, substitute the vertices, or create a newModelclass.
ColorFactory class
- Change "Normalized" in method names to "Norm". E.g.,
fromNormalized()is nowfromNorm()
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 usingSound.getPitchAndSpeed().
TextureBuilder class
- Add
TextureBuilder.setWrapMode(WrapMode), along with a newjangl.graphics.textures.enums.WrapModeobject - Add a shortcut for
TextureBuilder.setImagePath(pathstr):new TextureBuilder(pathstr)
Coordinates classes
- Add a
PixelCoordsandWorldCoordscopy constructor
Text class
- Add a
yCutoffvalue, that can be set in the text factory - Add a
wrapWidthvalue, 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
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)
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()
Textures
Textures can change their filter mode after creation.
- Add
Texture.setSmoothScaling() - Add
Texture.setPixelatedScaling() - Add
Texture.setFilterMode(int)
Bugfixes
5.1.3 - `Rect.setHeight()` hotfix
- Fix
Rect.setHeight(). Before, it was not actually setting the height of the rectangle.
5.1.2 - Vertex Shader Precompilation Overhaul
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()andWindow.getScreenHeight()returning incorrect values when the desired window size is smaller than what the operating system will allow. - Make
Sounderror messages more useful
5.1.1 - Memory Leak Hotfix
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/javabecause IntelliJ doesn't like it otherwise
5.1.0 - Text Justification
5.1.0 - Text Justification
Additions
- Add the
jangl.graphics.font.Justifyenum, which has valuesLEFT,CENTER, andRIGHT - Add
Textjustification. You can specify text Justification using theText(WorldCoords, Font, float, String, Justify) - The window centers itself on the primary monitor upon initialization
Fixes
Coords.sub()andCoords.div()take in aCoordsobject instead of aWorldCoordsobject- 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
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
Windowclass 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 usingJANGL.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
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, andTexturedModelclass 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.