Skip to content

v0.10.0

Compare
Choose a tag to compare
@da1nerd da1nerd released this 08 May 17:52
· 52 commits to master since this release

Cleanup

This release is light on UI improvements and heavy on refactoring.

Texture Atlas

There's now a handy texture atlas utility. There's a new TextureOffset component that uses an internal atlas to provide the proper offset coordinates to the shader. Now you can texture an object several different ways from just a single texture. I'm not 100% in love with the current api, but it'll work for now.

GUIs

Woot! You can now draw GUI elements! It's pretty simple too:

  gui_entity = Prism::Entity.new
  gui_entity.add Prism::GUIElement.new(texture, position_vec2, scale_vec2)

This is a very low level GUI system. All you can do is write a texture and eventually color with a certain scale and position to the screen.
I want to create a more complete GUI system with some pre-built elements, and a constraint system, but that may come as an entirely separate lib.
Peek 2020-05-09 00-36

Refactoring

The internal refactoring may not be so interesting, but I'm super pleased with the changes, so I'll list the big ones here.

  • Completely re-wrote models (used to be mesh). The terminology is better. The abstraction is better. This has needed an update for awhile and was holding back some further shader automation and extensibility.
  • Completely re-wrote textures. As a result you can now use Prism::Texture as a uniform type in your Shader::Program and it will just work.
  • Added a ReferencePool for pooling resources for reuse. I had an old system in place, but this one is way easier to use, and has tests! As an example, Prism::Texture is pooled, so when you try to load a texture from the disk it will check the pool first. The performance and memory gains should be obvious. And it supports garbage collection.