Skip to content

Commit 5b5f1b5

Browse files
committed
add --instant option for timing checks
1 parent 2dfed03 commit 5b5f1b5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

blitzloop/renderer/gles.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,11 @@ def build(self):
220220
vbodata = []
221221
idxdata = []
222222
for i,g in enumerate(self.line.glyphs):
223-
tleft = map_to(map_from(g.x + g.glyph.left, g.tx1, g.tx2), g.t1, g.t2)
224-
tright = map_to(map_from(g.x + g.glyph.right, g.tx1, g.tx2), g.t1, g.t2)
223+
if get_opts().instant:
224+
tleft = tright = g.t1
225+
else:
226+
tleft = map_to(map_from(g.x + g.glyph.left, g.tx1, g.tx2), g.t1, g.t2)
227+
tright = map_to(map_from(g.x + g.glyph.right, g.tx1, g.tx2), g.t1, g.t2)
225228
const_vbodata = [self.line.start, self.line.end]
226229
const_vbodata += list(i/255.0 for i in sum(g.colors + g.colors_on, ()))
227230
vbodata.append(

blitzloop/util.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ def init_argparser():
6868
parser.add_argument(
6969
'--fps', default="60", type=int,
7070
help='Display FPS (required for correct video sync)')
71+
parser.add_argument(
72+
'--instant', default=False, action='store_true',
73+
help='use instant syllable display instead of scrolling')
7174

7275
def get_argparser():
7376
return configargparse.get_argument_parser()

0 commit comments

Comments
 (0)