Add easy log macros; add vec_init; windows managed by vec now

This commit is contained in:
2022-06-27 19:12:26 +00:00
parent bccb0a53fd
commit 9c5767436d
9 changed files with 67 additions and 47 deletions

View File

@@ -46,16 +46,6 @@ struct sFont *MakeFont(const char *fontfile, int height)
printf("failed\n");
}
int tw,th;
unsigned char *testbitmap = stbtt_GetCodepointBitmap(&fontinfo, 0, stbtt_ScaleForPixelHeight(&fontinfo, 100), 'G', &tw, &th, 0,0);
for (int i = 0; i < th; ++i) {
for (int j = 0; j<tw; ++j)
putchar(" .:ioVM@"[testbitmap[i*tw+j]>>5]);
putchar('\n');
}
float scale = stbtt_ScaleForPixelHeight(&fontinfo, 64);
int ascent, descent, linegap;
@@ -75,13 +65,6 @@ struct sFont *MakeFont(const char *fontfile, int height)
bitmap = stbtt_GetCodepointBitmap(&fontinfo, 0,
stbtt_ScaleForPixelHeight(&fontinfo, newfont->height), c, &w, &h, 0, 0);
for (int i = 0; i < h; ++i) {
for (int j = 0; j<w; ++j)
putchar(" .:ioVM@"[bitmap[i*w+j]>>5]);
putchar('\n');
}
GLuint ftexture;
glGenTextures(1, &ftexture);
glBindTexture(GL_TEXTURE_2D, ftexture);