bmx-ng / gfx.mod

bgfx rendering library backend for BlitzMax
1 stars 2 forks source link

Add bgfx Texture support #3

Closed woollybah closed 6 years ago

woollybah commented 6 years ago

bgfx requires textures to be of a certain format : DDS, KTX or PVR texture data.

We don't currently have a direct way to take (say) a .png and load it as a bgfx texture instance.

There is a command-line texture compiler available with bgfx. This may be all that's required, and assume that the developer will convert their images into a compatible format - which could then be loaded by the app at runtime (incbin/stream/etc).

Or we port/wrap the texture compiler so that it can be used inline.

GWRon commented 6 years ago

Instead of incorporating stuff via eg. a "make.bmk"-snippet (all png/jpg/...files in a "projectpath/assets" folder) I would prefer the port of the texture compiler.

Things should be as convenient for the "end developers" as usual: LoadImage(bla) and they should be able to use the image either as TPixmap, or whatever else is needed.

As Max2D might get replaced somewhen by bgfxMax2D you could also extend the TPixmap/TImage-classes to get the desired functionality you need for bgfx.

woollybah commented 6 years ago

We are happy to accept PRs for ports :-)

GWRon commented 6 years ago

Think the basics should be working first - to test out if what was ported (or written from scratch) works as intended ;)

woollybah commented 6 years ago

Implemented a texturec module.