import "LinkList"
import "File"
import "FontResource"
+import "FontRenderer"
import "atlasBuilder"
import "imgDistMap"
-#define SHADERS
+#include "glHelpers.h"
#include <math.h>
glyph->imageIndex = -1;
if( renderer.registerImage )
{
- if(outlinePass)
- {
- renderer.setLayer(3); //DM_LAYER_BELOW);
- }
- glyph->imageIndex = renderer.registerImage( gx, gy, glyphareawidth, glyphareaheight );
- if(outlinePass)
- {
- renderer.setLayer(6); //DM_LAYER_NORMAL);
- }
+ renderer.setLayer(outlinePass ? 3 : 6);
+ glyph->imageIndex = renderer.registerImage( gx, gy, glyphareawidth, glyphareaheight);
}
// Add char to hash table
if( glyph )
{
font.addKerning(prevGlyphIndex, glyph, &x, &subpixel );
-#if !defined(SHADERS)
if(font.processImage)
{
FMGlyph *outlineGlyph = getGlyph(font, codepoint, state->size, subpixel, true );
if(outlineGlyph)
drawTextGlyph(font, outlineGlyph, x, y, true );
}
-#endif
drawTextGlyph(font, glyph, x, y, false );
addGlyphAdvance( &x, &subpixel, glyph );
}
if( glyph )
{
font.addKerning(prevGlyphIndex, glyph, &x, &subpixel );
-#if !defined(SHADERS)
if(font.processImage)
{
FMGlyph *outlineGlyph = getGlyph(font, codepoint, state->size, subpixel, true );
if(outlineGlyph)
drawTextGlyph(font, outlineGlyph, x, y, true );
}
-#endif
drawTextGlyph(font, glyph, x, y, false );
addGlyphAdvance( &x, &subpixel, glyph );
}
if( glyph )
{
font.addKerning(prevGlyphIndex, glyph, &x, &subpixel );
-#if !defined(SHADERS)
if(font.processImage)
{
FMGlyph *outlineGlyph = getGlyph(font, codepoint, state->size, subpixel, true );
if(outlineGlyph)
drawTextGlyph(font, outlineGlyph, x, y, true );
}
-#endif
drawTextGlyph(font, glyph, x, y, false );
addGlyphAdvance( &x, &subpixel, glyph );
if( x > truncatepoint )
if( glyph )
{
subpixel = font.ftFont.getGlyphKernAdvance( pathdraw.prevGlyphIndex, glyph->glyphindex );
-#if !defined(SHADERS)
if(font.processImage)
{
FMGlyph *outlineGlyph = getGlyph(font, unicode, state->size, 0, true );
if(outlineGlyph)
drawTextGlyphFloat(font, outlineGlyph, x, y, vectorx, vectory, (float)subpixel * (1.0f/64.0f), pathdraw.middleAlign, true );
}
-#endif
drawTextGlyphFloat(font, glyph, x, y, vectorx, vectory, (float)subpixel * (1.0f/64.0f), pathdraw.middleAlign, false );
subpixel += glyph->advance;