]> gitweb.factorcode.org Git - factor.git/blob - basis/opengl/debug/debug-docs.factor
c1564ff90556426054d731337eeef66bdf904fe6
[factor.git] / basis / opengl / debug / debug-docs.factor
1 ! (c)2009 Joe Groff bsd license
2 USING: help.markup help.syntax tools.continuations ;
3 IN: opengl.debug
4
5 HELP: G
6 { $description "Makes the OpenGL context associated with " { $link G-world } " active for subsequent OpenGL calls. This is intended to be used from the listener, where interactively entered OpenGL calls can be directed to any window. Note that the Factor UI resets the OpenGL context every time a window is updated, so every code snippet entered in the listener must be prefixed with " { $snippet "G" } " in this use case." }
7 { $examples { $code "USING: opengl.debug ui ;
8
9 [ drop t ] find-window G-world set
10 G 0.0 0.0 1.0 1.0 glClearColor
11 G GL_COLOR_BUFFER_BIT glClear" } } ;
12
13 HELP: F
14 { $description "Flushes the OpenGL context associated with " { $link G-world } ", thereby committing any outstanding drawing operations." } ;
15
16 HELP: G-world
17 { $var-description "The world whose OpenGL context is made active by " { $link G } "." } ;
18
19 HELP: GB
20 { $description "A shorthand for " { $link gl-break } "." } ;
21
22 HELP: gl-break
23 { $description "Suspends the current thread and activates the walker like " { $link break } ", but also preserves the current OpenGL context, saves it to " { $link G-world } " for interactive use through " { $link G } ", and restores the current context when the suspended thread is continued. The shorthand word " { $link POSTPONE: GB } " can also be used." } ;
24
25 { G F G-world POSTPONE: GB gl-break } related-words
26
27 ARTICLE: "opengl.debug" "Interactive debugging of OpenGL applications"
28 "The " { $vocab-link "opengl.debug" } " vocabulary provides words to assist with interactive debugging of OpenGL applications in the Factor UI."
29 { $subsections
30     G-world
31     G
32     F
33     GB
34     gl-break
35 } ;
36
37 ABOUT: "opengl.debug"