still doesn't work
This commit is contained in:
parent
19ede3b694
commit
7ca9afc751
Binary file not shown.
Binary file not shown.
@ -386,9 +386,12 @@ draw_string_internal(float x, float y, const char *string, texture_font_t *fnt,
|
||||
|
||||
texture_font_load_glyphs(fnt, string);
|
||||
|
||||
if (fnt->atlas->dirty)
|
||||
if (fnt->atlas->id == 0)
|
||||
{
|
||||
log_write("Atlas updated\n");
|
||||
glGenTextures(1, &fnt->atlas->id);
|
||||
}
|
||||
ds_bind_texture(fnt->atlas->id);
|
||||
if (fnt->atlas->dirty) {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
@ -489,8 +492,6 @@ xoverlay_draw_string_with_outline(float x, float y, const char *string, xoverlay
|
||||
return;
|
||||
}
|
||||
|
||||
ds_bind_texture(fnt->atlas->id);
|
||||
|
||||
fnt->rendermode = RENDER_OUTLINE_POSITIVE;
|
||||
fnt->outline_thickness = outline_width;
|
||||
draw_string_internal(x, y, string, fnt, *(vec4*)&outline_color, NULL, NULL);
|
||||
|
@ -38,7 +38,6 @@ xoverlay_font_load(const char *path, float size)
|
||||
result.atlas = texture_atlas_new(1024, 1024, 1);
|
||||
if (result.atlas != NULL)
|
||||
{
|
||||
glGenTextures(1, &result.atlas->id);
|
||||
result.font = texture_font_new_from_file(result.atlas, size, path);
|
||||
if (result.font == NULL)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user