Cleanup, stop drawing space characters
This commit is contained in:
+3
-1
@@ -329,7 +329,9 @@ stringToList gap = concatMap (uncurry charToTuple) . zip [0, 100 + gap ..]
|
||||
|
||||
charToTuple :: Float -> Char -> [(Point3, Point4, Point3)]
|
||||
{-# INLINE charToTuple #-}
|
||||
charToTuple xoff c = [f 0 0, f 1 0, f 1 1, f 0 0, f 1 1, f 0 1]
|
||||
charToTuple xoff c
|
||||
| fromEnum c == 32 = [] -- don't draw space characters
|
||||
| otherwise = [f 0 0, f 1 0, f 1 1, f 0 0, f 1 1, f 0 1]
|
||||
where
|
||||
f x y = (V3 (xoff + x * 100) (y * 200) 0, white, V3 x (1 - y) charnum)
|
||||
-- textures in opengl have origins at the lower left, my char array has its
|
||||
|
||||
Reference in New Issue
Block a user