planetis-m / naylib

Yet another raylib Nim wrapper
MIT License
209 stars 11 forks source link

Constructing Texture/Font fails due to read-only fields #20

Closed planetis-m closed 2 years ago

planetis-m commented 2 years ago

Examples like models/skybox and text/font_sdf can't be ported yet due to read-only *Count fields in Texture/Font. Either remove them and directly export the fields or create types TextureBase/FontBase that are public but Texture/Font are distinct.

planetis-m commented 2 years ago

related #6

planetis-m commented 2 years ago

actually everything in Texture is public and Font has a fromData constructor now. Closing.

planetis-m commented 2 years ago

Another idea is to make Texture2D distinct with field procs and a converter from Texture->Texture2D Leaving TextureCubemap an alias to Texture.

planetis-m commented 2 years ago

bad idea.