PETSC_DRAW_SDL3#
PETSc graphics device that uses SDL3 windows or an offscreen SDL3 surface
Options Database Keys#
-draw_size w,h - percentage of screen (either 1, .5, .3, .25), or size in pixels
-geometry x,y,w,h - set location and size in pixels
-draw_virtual (true|false) - do not open a window (draw on an offscreen surface),
-draw_savewill still work-draw_sdl3_font filename - font file to use for text, searched for on standard font paths if not provided
Notes#
SDL3_ttf must have access to some font otherwise a runtime error is generated. One can use -draw_sdl3_font filename in that
case to point to some available font.
Each process draws on its own offscreen surface. PetscDrawFlush() combines the surfaces of all processes with
MPI_Reduce(), and the first process displays the combined image in its window. Where several processes draw the
same pixel, the combined image contains one of their colors. PetscDrawSave(), and thus -draw_save, also
uses the combined image.
A draw from PetscDrawGetSingleton() draws on the surface of its process. On the first process, PetscDrawFlush()
of that draw displays only this surface in the window of the parent draw. The next PetscDrawFlush() of the parent
draw again displays the combined image of all processes.
Double buffering is always enabled for PETSC_DRAW_SDL3 so -draw_double_buffer 0 is ignored.
See Also#
Level#
beginner
Location#
src/sys/classes/draw/impls/sdl3/sdl3ops.c
Index of all Draw routines
Table of Contents for all manual pages
Index of all manual pages