shibbo / Fushigi

An editor for Super Mario Bros. Wonder.
MIT License
133 stars 30 forks source link

Add simple texture loading support #28

Closed KillzXGaming closed 11 months ago

KillzXGaming commented 11 months ago

As the current build, there is no way to load images intuitively so I added in support using some classes.

There is static functions in GLTexture2D.Load() to simply load either an image file like .png, jpg, etc and also ones to load a raw image given the width, height and raw rgba8 data.

This also includes a GLImageCache class, which can be used for loading in stored images from a lookup and can be easily disposed of.

Once a GLTexture2D is created, simply access the ID property and use that to use with Imgui.Image() or use it to bind for gl rendering.