dd_string3d.h 679 B

123456789101112131415161718192021222324252627
  1. #ifndef DD_STRING3D_H
  2. #define DD_STRING3D_H
  3. #include "dd_mesh.h"
  4. #include "dd_vector.h"
  5. /* string3d
  6. * Used to draw 3d text on screen.
  7. * This class has all the letters in a static way so they
  8. * are loaded once using the `init()` function.
  9. * Each instance of this class, behaves like a style-font,
  10. * this means that it has data to display text, but does not
  11. * save the text itself.
  12. */
  13. struct dd_mesh **letter, **number;
  14. void dd_string3d_init();
  15. struct dd_string3d {
  16. struct dd_vec3 colorFront, colorBack;
  17. unsigned char align;
  18. };
  19. void dd_string3d_draw(struct dd_string3d *str3d, const char* text);
  20. void dd_string3d_draw_int(struct dd_string3d *str3d, int num);
  21. #endif