ResourceLoader.hpp 682 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. namespace mgl {
  3. class Font;
  4. class Texture;
  5. }
  6. namespace QuickMedia {
  7. void set_resource_loader_root_path(const char *resource_root);
  8. const char* get_resource_loader_root_path();
  9. }
  10. namespace QuickMedia::FontLoader {
  11. enum class FontType {
  12. LATIN,
  13. LATIN_BOLD,
  14. LATIN_MONOSPACE,
  15. CJK,
  16. SYMBOLS
  17. };
  18. // Note: not thread-safe
  19. mgl::Font* get_font(FontType font_type, unsigned int character_size);
  20. }
  21. namespace QuickMedia::TextureLoader {
  22. // Note: not thread-safe. Filepath is relative to the resource loader root path
  23. mgl::Texture* get_texture(const char *filepath, bool pixel_coordinates = false);
  24. }