integrate and link lib curl for android, add VAO support for brush draw, sync canvas with screen redraw instead of input events

This commit is contained in:
2017-03-28 20:25:23 +01:00
parent 291ba7ae78
commit 675e0148ec
11 changed files with 85 additions and 33 deletions

View File

@@ -16,7 +16,11 @@ bool Font::load(const char* ttf, int font_size)
auto bitmap = std::make_unique<uint8_t[]>(w*h);
chars.resize(num_chars);
int ret = stbtt_BakeFontBitmap(file.m_data, 0, (float)font_size, bitmap.get(), w, h, start_char, num_chars, chars.data());
#ifdef __APPLE__
font_tex.create(w, h, GL_RED, bitmap.get());
#else
font_tex.create(w, h, GL_LUMINANCE, bitmap.get());
#endif // __APPLE__
file.close();
return true;
}