module Log: sig
.. end
Shader compiler messages
type
compiler_msg = [ `Msg of string | `Msg_loc of string * Lit.Prog.loc * string ]
The type for shader compiler messages.
val pp_compiler_msg : Format.formatter -> compiler_msg -> unit
pp_compiler_msg ppf m
prints an unspecified representation of m
on ppf
.
type
compiler_msg_parser = string -> [ `Loc of string * int * int * string | `Unparsed of string ]
The type for shader compiler message parsers. Parses a line into
either:
`Loc (before, file_id, line, after)
, for error messages
with file (which are represented by numbers) and line locations.
`Unparsed msg
if no location can be parsed in the error
message
val compiler_msg_parser_default : compiler_msg_parser
compiler_parser_default
parses the following patterns into
`Loc
:
- msg:int:int:msg
- int:int:msg
Otherwise returns
`Unparsed
.
val compiler_msg_parser_raw : compiler_msg_parser
compiler_parser_raw s
is always `Unparsed
. This allows
to get the raw log.
Renderer messages
type
msg = [ `Compiler of compiler_msg list
| `Linker of string list
| `Missing_attr of Lit.prim * string
| `Msg of string
| `Unsupported_shaders of Lit.prog * Lit.Prog.shader list ]
The type for log messages.
`Compiler msgs
shader compilation log.
`Linker msgs
GPU program linker log.
`Missing_attr (prim, att)
primitive prim
is missing an attribute
named att
`Unsupported_shaders (prog, sl)
program prog
is using
shaders sl
whose kind is unsupported by the OpenGL renderer.
`Msg msg
generic message TODO remove that ?.
val pp_msg : Format.formatter -> msg -> unit
pp_msg ppf m
prints an unspecified representation of m
on
ppf
.
Logs
type
level = [ `Debug | `Error ]
The type for log levels.
type
t = level -> msg -> unit
The type for logs.
val of_formatter : Format.formatter -> t
of_formatter ppf
is a log that outputs on ppf
.