forked from harrisonpartch/spasim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGLinfo.Mod
executable file
·44 lines (28 loc) · 1.14 KB
/
GLinfo.Mod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
MODULE GLinfo;
(*
Print GL and GLU version and extension info
*)
IMPORT GL := OpenGL, GLC:= OpenGLConst, KernelLog, GLContext, Strings;
PROCEDURE Do*;
VAR context: GLContext.Context;
s: Strings.String;
BEGIN
NEW(context);
context.Init(100, 100, "Info", FALSE);
context.MakeCurrent;
KernelLog.Ln;
s := GL.GLGetString(GLC.GL_VERSION); KernelLog.String("GL_VERSION: "); KernelLog.String(s^); KernelLog.Ln;
s := GL.GLGetString(GLC.GL_EXTENSIONS); KernelLog.String("GL_EXTENSIONS: "); KernelLog.String(s^); KernelLog.Ln;
s := GL.GLGetString(GLC.GL_RENDERER); KernelLog.String("GL_RENDERER: "); KernelLog.String(s^); KernelLog.Ln;
s := GL.GLGetString(GLC.GL_VENDOR); KernelLog.String("GL_VENDOR: "); KernelLog.String(s^); KernelLog.Ln;
KernelLog.Ln;
s := GL.GLUGetString(GLC.GLU_VERSION); KernelLog.String("GLU_VERSION: "); KernelLog.String(s^); KernelLog.Ln;
s := GL.GLUGetString(GLC.GLU_EXTENSIONS); KernelLog.String("GLU_EXTENSIONS: "); KernelLog.String(s^); KernelLog.Ln;
context.DeActivate;
context.Close;
context := NIL;
END Do;
BEGIN
END GLinfo.
GLinfo.Do ~
SystemTools.Free GLinfo GLContext ~