Make GRAPHIC select the text plane
Some checks failed
akbasic CI Build / cmake_build (push) Failing after 3m22s
akbasic CI Build / sanitizers (push) Failing after 4m43s
akbasic CI Build / coverage (push) Failing after 3m43s
akbasic CI Build / akgl_build (push) Failing after 4m48s
akbasic CI Build / mutation_test (push) Failing after 3m31s
Some checks failed
akbasic CI Build / cmake_build (push) Failing after 3m22s
akbasic CI Build / sanitizers (push) Failing after 4m43s
akbasic CI Build / coverage (push) Failing after 3m43s
akbasic CI Build / akgl_build (push) Failing after 4m48s
akbasic CI Build / mutation_test (push) Failing after 3m31s
Co-authored-by: Andrew Kesterson <andrew@aklabs.net>
This commit is contained in:
@@ -197,16 +197,17 @@ static akerr_ErrorContext AKERR_NOIGNORE *draw_program(const char *outpath, int
|
||||
}
|
||||
PASS(errctx, akbasic_runtime_load(&RUNTIME, SOURCE));
|
||||
PASS(errctx, akbasic_runtime_start(&RUNTIME, AKBASIC_MODE_RUN));
|
||||
/* The same layer bracket and composition order the standalone frontend uses. */
|
||||
PASS(errctx, akbasic_graphics_akgl_begin(&GRAPHICS));
|
||||
PASS(errctx, akbasic_runtime_run(&RUNTIME, 0));
|
||||
PASS(errctx, akbasic_graphics_akgl_end(&GRAPHICS));
|
||||
|
||||
/*
|
||||
* The drawing verbs are immediate and are already on the target. The text
|
||||
* grid and the sprites are not: both are redrawn from state the interpreter
|
||||
* keeps, which in the standalone frontend happens once a frame. There is no
|
||||
* frame here, so this is it -- and the order is the frontend's, grid first
|
||||
* and sprites over it, because that ordering is what a program written
|
||||
* against the real host will have assumed.
|
||||
* The drawing layer, text grid and sprites all redraw from retained state.
|
||||
* Keep this in the frontend's order so a documentation image exercises the
|
||||
* same GRAPHIC composition users run rather than a convenient direct path.
|
||||
*/
|
||||
PASS(errctx, akbasic_graphics_akgl_render(&GRAPHICS));
|
||||
if ( grid ) {
|
||||
PASS(errctx, akbasic_sink_akgl_render(&SINK));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user