]> gitweb.factorcode.org Git - factor.git/blob - basis/opengl/annotations/annotations-docs.factor
change ERROR: words from throw-foo back to foo.
[factor.git] / basis / opengl / annotations / annotations-docs.factor
1 USING: alien help.markup help.syntax io kernel math quotations
2 opengl.gl assocs vocabs.loader sequences accessors colors words
3 opengl ;
4 IN: opengl.annotations
5
6 HELP: log-gl-error
7 { $values { "function" word } }
8 { $description "If the most recent OpenGL call resulted in an error, append it to the " { $link gl-error-log } "." }
9 { $notes "Don't call this function directly. Call " { $link log-gl-errors } " to annotate every OpenGL function to automatically log errors." } ;
10
11 HELP: gl-error-log
12 { $var-description "A vector of OpenGL errors logged by " { $link log-gl-errors } ". Each log entry has the following tuple slots:" }
13 { $list
14     { { $snippet "function" } " is the OpenGL function that raised the error." }
15     { { $snippet "error" } " is the OpenGL error code." }
16     { { $snippet "timestamp" } " is the time the error was logged." }
17 }
18 { "The error log is emptied using the " { $link clear-gl-error-log } " word." } ;
19
20 HELP: clear-gl-error-log
21 { $description "Empties the OpenGL error log populated by " { $link log-gl-errors } "." } ;
22
23 HELP: throw-gl-errors
24 { $description "Annotate every OpenGL function to throw a " { $link gl-error } " if the function results in an error. Use " { $link reset-gl-functions } " to reverse this operation." } ;
25
26 HELP: log-gl-errors
27 { $description "Annotate every OpenGL function to log using " { $link log-gl-error } " if the function results in an error. Use " { $link reset-gl-functions } " to reverse this operation." } ;
28
29 HELP: reset-gl-functions
30 { $description "Removes any annotations from all OpenGL functions, such as those applied by " { $link gl-errors } " or " { $link log-gl-errors } "." } ;
31
32 { gl-errors gl-error log-gl-errors log-gl-error clear-gl-error-log reset-gl-functions } related-words
33
34 ARTICLE: "opengl.annotations" "OpenGL error reporting"
35 "The " { $vocab-link "opengl.annotations" } " vocabulary provides some tools for tracking down GL errors:"
36 { $subsections
37     gl-errors
38     log-gl-errors
39     clear-gl-error-log
40     reset-gl-functions
41 } ;
42
43 ABOUT: "opengl.annotations"