Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Valathil on December 28, 2011, 09:01:26 pm
-
annoying white lines from font rendering :mad: couldnt stand them anymore, wrote fix
Index: code/graphics/gropengldraw.cpp
===================================================================
--- code/graphics/gropengldraw.cpp (revision 8115)
+++ code/graphics/gropengldraw.cpp (working copy)
@@ -477,10 +477,10 @@
}
u0 = u_scale * (i2fl(u+xd) / bw);
- v0 = v_scale * (i2fl(v+yd) / bh);
+ v0 = v_scale * (i2fl(v+yd) / bh)*(do_resize?0.99f:1.0f);
u1 = u_scale * (i2fl((u+xd)+wc) / bw);
- v1 = v_scale * (i2fl((v+yd)+hc) / bh);
+ v1 = v_scale * (i2fl((v+yd)+hc) / bh)*(do_resize?0.99f:1.0f);
glTexCoord2f(u0, v1);
glVertex2i(x1, y2);
feedback plz. then commit. also nominate immediately for .14 inclusion.
-
Okay, idiot question, but I'm really not familiar with this kind of tweaking - how do I put this in?
-
YES
-
VALATHIL
I'd write something like "stop being so magical" but then it might actually happen so I won't
KEEP BEING MAGICAL :nod:
-
i changed the wrong line : this should be better and work with the original font and the new bluplanet one
Index: code/graphics/gropengldraw.cpp
===================================================================
--- code/graphics/gropengldraw.cpp (revision 8119)
+++ code/graphics/gropengldraw.cpp (working copy)
@@ -479,8 +479,8 @@
u0 = u_scale * (i2fl(u+xd) / bw);
v0 = v_scale * (i2fl(v+yd) / bh);
- u1 = u_scale * (i2fl((u+xd)+wc) / bw);
- v1 = v_scale * (i2fl((v+yd)+hc) / bh);
+ u1 = u_scale * (i2fl((u+xd)+wc) / bw)*(do_resize?0.99f:1.0f);
+ v1 = v_scale * (i2fl((v+yd)+hc) / bh)*(do_resize?0.99f:1.0f);
glTexCoord2f(u0, v1);
glVertex2i(x1, y2);
-
Is this more font-agnostic then?
-
coming from me its more font-atheistic. it knows its not a font but just a texture.
-
There are no words to expres my joy and gratitude that those annoying little lines were gone. Those have been bugging me for years, YEARS I tell you.
Thank you Valathil. I bestow upon you the title of "Most Magical Sensational Powerful Super-Duper Wizard Savant Genius."
-
Thank you Valathil. I bestow upon you the title of "Most Magical Sensational Powerful Super-Duper Wizard Savant Genius."
+1 to that!!