add antialiasing back
This commit is contained in:
parent
90c1027906
commit
f3444c3fff
@ -4,8 +4,8 @@
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1065248743074061017" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(g?cc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1065738691104269017" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
@ -57,8 +57,6 @@ glez_font_t glez_font_load(const char *path, float size)
|
||||
return GLEZ_FONT_INVALID;
|
||||
}
|
||||
|
||||
result.font->hinting = 0;
|
||||
|
||||
for (glez_font_t i = 0; i < GLEZ_FONT_COUNT; ++i)
|
||||
{
|
||||
if (loaded_fonts[i].init == 0)
|
||||
|
32
src/glez.c
32
src/glez.c
@ -51,10 +51,8 @@ void glez_resize(int width, int height)
|
||||
void glez_line(float x, float y, float dx, float dy, glez_rgba_t color,
|
||||
float thickness)
|
||||
{
|
||||
x += 0.5f;
|
||||
y += 0.5f;
|
||||
dx -= 0.5f;
|
||||
dy -= 0.5f;
|
||||
/*x += 0.375f;
|
||||
y += 0.375f;*/
|
||||
|
||||
GLuint indices[6] = { 0, 1, 3, 3, 2, 0 };
|
||||
|
||||
@ -100,10 +98,8 @@ void glez_line(float x, float y, float dx, float dy, glez_rgba_t color,
|
||||
|
||||
void glez_rect(float x, float y, float w, float h, glez_rgba_t color)
|
||||
{
|
||||
x += 0.5f;
|
||||
y += 0.5f;
|
||||
w -= 0.5f;
|
||||
h -= 0.5f;
|
||||
/*x += 0.375f;
|
||||
y += 0.375f;*/
|
||||
|
||||
struct vertex_main vertices[4];
|
||||
GLuint indices[6] = { 0, 1, 2, 2, 3, 0 };
|
||||
@ -147,10 +143,8 @@ void glez_rect_textured(float x, float y, float w, float h, glez_rgba_t color,
|
||||
internal_texture_t *tex = internal_texture_get(texture);
|
||||
internal_texture_bind(texture);
|
||||
|
||||
x += 0.5f;
|
||||
y += 0.5f;
|
||||
w -= 0.5f;
|
||||
h -= 0.5f;
|
||||
/*x += 0.375f;
|
||||
y += 0.375f;*/
|
||||
|
||||
GLuint idx = program_next_index();
|
||||
|
||||
@ -209,8 +203,8 @@ void draw_string_internal(float x, float y, const char *string,
|
||||
ds_bind_texture(fnt->atlas->id);
|
||||
if (fnt->atlas->dirty)
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||
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_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, fnt->atlas->width,
|
||||
@ -238,10 +232,10 @@ void draw_string_internal(float x, float y, const char *string,
|
||||
x += texture_glyph_get_kerning(glyph, &string[i - 1]);
|
||||
}
|
||||
|
||||
float x0 = (pen_x + glyph->offset_x);
|
||||
float y0 = (pen_y - glyph->offset_y);
|
||||
float x1 = (x0 + glyph->width);
|
||||
float y1 = (y0 + glyph->height);
|
||||
float x0 = (int)(pen_x + glyph->offset_x);
|
||||
float y0 = (int)(pen_y - glyph->offset_y);
|
||||
float x1 = (int)(x0 + glyph->width);
|
||||
float y1 = (int)(y0 + glyph->height);
|
||||
float s0 = glyph->s0;
|
||||
float t0 = glyph->t0;
|
||||
float s1 = glyph->s1;
|
||||
@ -264,7 +258,7 @@ void draw_string_internal(float x, float y, const char *string,
|
||||
color, DRAW_MODE_FREETYPE };
|
||||
|
||||
pen_x += glyph->advance_x;
|
||||
pen_x = (int) pen_x + 1;
|
||||
//pen_x = (int) pen_x + 1;
|
||||
if (glyph->height > size_y)
|
||||
size_y = glyph->height;
|
||||
|
||||
|
@ -67,7 +67,6 @@ const char *shader_ultimate_frag =
|
||||
" gl_FragColor = frag_Color * tex;\n"
|
||||
" else if (frag_DrawMode == 3)\n"
|
||||
" {\n"
|
||||
" if (tex.r > 0.4) tex.r = 1.0;\n"
|
||||
" gl_FragColor = vec4(frag_Color.rgb, frag_Color.a * tex.r);\n"
|
||||
" }\n"
|
||||
" else\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user