]> gitweb.factorcode.org Git - factor.git/blob - basis/opengl/capabilities/capabilities-docs.factor
improve help by linking to types directly.
[factor.git] / basis / opengl / capabilities / capabilities-docs.factor
1 USING: help.markup help.syntax io kernel math quotations
2 opengl.gl assocs ;
3 IN: opengl.capabilities
4
5 HELP: gl-version
6 { $values { "version" "The version string from the OpenGL implementation" } }
7 { $description "Wrapper for " { $snippet "GL_VERSION glGetString" } " that removes the vendor-specific information from the version string." } ;
8
9 HELP: gl-vendor-version
10 { $values { "version" "The vendor-specific version information from the OpenGL implementation" } }
11 { $description "Wrapper for " { $snippet "GL_VERSION glGetString" } " that returns only the vendor-specific information from the version string." } ;
12
13 HELP: has-gl-version?
14 { $values { "version" "A version string" } { "?" boolean } }
15 { $description "Compares the version string returned by " { $link gl-version } " to " { $snippet "version" } ". Returns true if the implementation version meets or exceeds " { $snippet "version" } "." } ;
16
17 HELP: require-gl-version
18 { $values { "version" "A version string" } }
19 { $description "Throws an exception if " { $link has-gl-version? } " returns false for " { $snippet "version" } "." } ;
20
21 HELP: glsl-version
22 { $values { "version" "The GLSL version string from the OpenGL implementation" } }
23 { $description "Wrapper for " { $snippet "GL_SHADING_LANGUAGE_VERSION glGetString" } " that removes the vendor-specific information from the version string." } ;
24
25 HELP: glsl-vendor-version
26 { $values { "version" "The vendor-specific GLSL version information from the OpenGL implementation" } }
27 { $description "Wrapper for " { $snippet "GL_SHADING_LANGUAGE_VERSION glGetString" } " that returns only the vendor-specific information from the version string." } ;
28
29 HELP: has-glsl-version?
30 { $values { "version" "A version string" } { "?" boolean } }
31 { $description "Compares the version string returned by " { $link glsl-version } " to " { $snippet "version" } ". Returns true if the implementation version meets or exceeds " { $snippet "version" } "." } ;
32
33 HELP: require-glsl-version
34 { $values { "version" "A version string" } }
35 { $description "Throws an exception if " { $link has-glsl-version? } " returns false for " { $snippet "version" } "." } ;
36
37 HELP: gl-extensions
38 { $values { "seq" "A sequence of strings naming the implementation-supported OpenGL extensions" } }
39 { $description "Wrapper for " { $snippet "GL_EXTENSIONS glGetString" } " that returns a sequence of extension names supported by the OpenGL implementation." } ;
40
41 HELP: has-gl-extensions?
42 { $values { "extensions" "A sequence of extension name strings" } { "?" boolean } }
43 { $description "Returns true if the set of " { $snippet "extensions" } " is a subset of the implementation-supported extensions returned by " { $link gl-extensions } ". Elements of " { $snippet "extensions" } " can be sequences, in which case true will be returned if any one of the extensions in the subsequence are available." }
44 { $examples "Testing for framebuffer object and pixel buffer support:"
45     { $code """{
46     { "GL_EXT_framebuffer_object" "GL_ARB_framebuffer_object" }
47     "GL_ARB_pixel_buffer_object"
48 } has-gl-extensions?""" }
49 } ;
50
51 HELP: has-gl-version-or-extensions?
52 { $values { "version" "A version string" } { "extensions" "A sequence of extension name strings" } { "?" boolean } }
53 { $description "Returns true if either " { $link has-gl-version? } " or " { $link has-gl-extensions? } " returns true for " { $snippet "version" } " or " { $snippet "extensions" } ", respectively. Intended for use when required OpenGL functionality can be verified either by a minimum version or a set of equivalent extensions." } ;
54
55 HELP: require-gl-extensions
56 { $values { "extensions" "A sequence of extension name strings" } }
57 { $description "Throws an exception if " { $link has-gl-extensions? } " returns false for " { $snippet "extensions" } "." } ;
58
59 HELP: require-gl-version-or-extensions
60 { $values { "version" "A version string" } { "extensions" "A sequence of extension name strings" } }
61 { $description "Throws an exception if neither " { $link has-gl-version? } " nor " { $link has-gl-extensions? } " returns true for " { $snippet "version" } " or " { $snippet "extensions" } ", respectively. Intended for use when required OpenGL functionality can be verified either by a minimum version or a set of equivalent extensions." } ;
62
63 { require-gl-version require-glsl-version require-gl-extensions require-gl-version-or-extensions has-gl-version? has-glsl-version? has-gl-extensions? has-gl-version-or-extensions? gl-version glsl-version gl-extensions } related-words
64
65 ABOUT: "gl-utilities"