Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Create Font and Texture from cPointer  (Read 3415 times)

0 Members and 1 Guest are viewing this topic.

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Create Font and Texture from cPointer
« on: September 24, 2016, 05:02:11 pm »
I'm writing a .Net binding for TGUI and I can't find a way to receive fonts and textures from my c++ code.

The Font and Texture class provide a constructor to create them from a cPointer, however their access specifiers don't allow using them. The one in Font is 'private' because it isn't used outside the class while the one from Texture is 'internal' because it is used in the RenderTexture constructor to get the texture from C.

I basically have to do something similar as that line in the RenderTexture constructor but with both fonts and textures, but these font and texture constructors can't be used outside the SFML.Net code.

Is there any chance that these constructors could be specified as 'protected internal'? That way they still can't be used under normal circumstances but if someone needs them they can inherit from the class and pass the cPointer from there.
Or is there another solution that I am overlooking?
TGUI: C++ SFML GUI

 

anything