raylib-cpp
raylib-cpp copied to clipboard
Add TextureUnmanaged
@Ataraxia-Mechanica What about something like this?
raylib::Font font("myfont.ttf");
{
raylib::TextureUnmanaged fontTexture = font.GetTexture();
fontTexture.Draw();
}
// No more error since we're usning a Unmanaged object?
This looks pretty cool, it allows method chaining too which is also a plus
What do you think ab ok it having TextureUjmanaged inherit from Texture instead ifnyhe other way around?
I think both way's fine
Thinking about this more, I think having this inheitance structure makes the most sense...
Texture
- raylib::TextureUnmanaged
- raylib::Texture
Then the majority of work is in the TextureUnmanaged
classes, and the Texture
just adds the managed aspect, along with the deleted copy constructor, etc.