1gl_getcontext(3) Svgalib User Manual gl_getcontext(3)
2
3
4
6 gl_getcontext, currentcontext - get the current graphics contents.
7
8
10 #include <vgagl.h>
11
12 void gl_getcontext(GraphicsContext *gc);
13
14 extern GraphicsContext currentcontext; /* this is already in vgagl.h */
15
16
18 Save the current context in the structure variable gc.
19
20 You can also get the current context from the global variable current‐
21 context;
22
23 However, simply access single elements in this structure with the
24 macros given in vgagl(7) but do not copy currentcontext in another
25 structure. This is because the size of the structure might change and
26 your program does not know it when it will be linked dynamically to
27 future svgalib versions.
28
29 Instead use gl_allocatecontext(3) to allocate such a structure, fill it
30 with gl_getcontext and release it with free(3) after usage.
31
32
34 svgalib(7), vgagl(7), svgalib.conf(5), threedkit(7), testgl(1),
35 plane(1), wrapdemo(1), gl_allocatecontext(3), gl_copyboxfromcontext(3),
36 gl_copyboxtocontext(3), gl_freecontext(3), gl_setcontext(3), gl_setcon‐
37 textheight(3), gl_setcontextvga(3), gl_setcontextvgavirtual(3), gl_set‐
38 contextvirtual(3), gl_setcontextwidth(3).
39
40
42 This manual page was edited by Michael Weller <eowmob@exp-math.uni-
43 essen.de>. The exact source of the referenced demo as well as of the
44 original documentation is unknown.
45
46 It is very likely that both are at least to some extent are due to Harm
47 Hanemaayer <H.Hanemaayer@inter.nl.net>.
48
49 Occasionally this might be wrong. I hereby asked to be excused by the
50 original author and will happily accept any additions or corrections to
51 this first version of the svgalib manual.
52
53
54
55Svgalib (>= 1.2.11) 2 Aug 1997 gl_getcontext(3)