mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
feat: rendering pages on demand
This commit is contained in:
parent
381cb77d08
commit
47809b4024
9 changed files with 106 additions and 39 deletions
|
|
@ -2,8 +2,12 @@
|
|||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class Font;
|
||||
struct Glyph;
|
||||
|
||||
class Texture;
|
||||
|
||||
namespace vector_fonts {
|
||||
class FontFile {
|
||||
|
|
@ -11,10 +15,14 @@ namespace vector_fonts {
|
|||
virtual ~FontFile() {}
|
||||
|
||||
virtual std::unique_ptr<Font> createInstance(int size) = 0;
|
||||
|
||||
virtual std::unique_ptr<Texture> renderPage(
|
||||
int pageid, std::vector<Glyph>& glyphs, int size
|
||||
) = 0;
|
||||
};
|
||||
|
||||
void initialize();
|
||||
void finalize();
|
||||
|
||||
std::unique_ptr<vector_fonts::FontFile> load_font(const std::string& filename);
|
||||
std::shared_ptr<vector_fonts::FontFile> load_font(const std::string& filename);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue