CmFont.cpp 739 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include "CmFont.h"
  2. #include "CmFontRTTI.h"
  3. #include "CmFontManager.h"
  4. namespace CamelotEngine
  5. {
  6. Font::Font()
  7. {
  8. }
  9. Font::~Font()
  10. {
  11. }
  12. void Font::initialize(const FONT_DESC& fontDesc, vector<TexturePtr>::type texturePages)
  13. {
  14. mFontDesc = fontDesc;
  15. mTexturePages = texturePages;
  16. Resource::initialize();
  17. }
  18. FontHandle Font::create(const FONT_DESC& fontDesc, vector<TexturePtr>::type texturePages)
  19. {
  20. FontPtr newFont = FontManager::instance().create(fontDesc, texturePages);
  21. return Resource::_createResourceHandle(newFont);
  22. }
  23. RTTITypeBase* Font::getRTTIStatic()
  24. {
  25. return FontRTTI::instance();
  26. }
  27. RTTITypeBase* Font::getRTTI() const
  28. {
  29. return Font::getRTTIStatic();
  30. }
  31. }