source: project/wiki/eggref/5/epoxy @ 37373

Last change on this file since 37373 was 37373, checked in by Kooda, 13 months ago

Document epoxy for CHICKEN 5

File size: 2.4 KB
Line 
1
2== epoxy
3[[toc:]]
4Bindings for the OpenGL and OpenGL ES APIs.
5
6Every version and profile of these APIs are available out of the box thanks to the Epoxy library. The actual version used is automatically determined by the current GL context (which you can obtain from windowing libraries like SDL or GLFW).
7
8This egg is based on Alex Charlton’s previous work on the opengl-glew egg and is a drop-in replacement for it. It also provides the functionnality of the old opengl egg (fixed pipeline).
9
10
11=== Requirements
12* bind
13
14
15=== Documentation
16All functions and constants from every version of the OpenGL specifications are exported. Scheme style names are provided (underscores and camelCase replaced with hyphens), the {{gl}} prefix is removed from names, functions starting with {{is}} instead end in question marks, and constants are bookended by {{+}}s (e.g. {{delete-texture}}, {{enabled?}}, {{+arb-viewport-array+}}). The terms {{1D}}, {{2D}} and {{3D}} are additionally hyphen separated in order to match their constant counterparts (e.g. {{tex-image-2d}} and {{+texture-2d+}}).
17
18Functions whose C counterparts accept or return {{GLboolean}} accept or return a Scheme boolean value. ''Do not'' pass {{+true+}} or {{+false+}} to these functions.
19
20
21==== Epoxy specific procedures
22<procedure> (has-gl-extension? EXTENSION)</procedure>
23
24Query whether the OpenGL extension, given as a string, is supported.
25
26<procedure> (is-desktop-gl?)</procedure>
27
28Return whether the current context is a regular desktop OpenGL one (#t), or an OpenGL ES one (#f).
29
30<procedure> (gl-version)</procedure>
31
32Return the current context’s OpenGL version as an integer (eg. 20 for 2.0, 43 for 4.3
)
33
34<procedure> (glsl-version)</procedure>
35
36Return the current context’s GLSL supported version.
37
38
39=== Example
40For numerous examples of this egg’s usage, look at the [[https://wiki.call-cc.org/egg/gl-utils|gl-utils]] egg, [[https://wiki.call-cc.org/egg/glls|glls]] egg, or the [[https://wiki.call-cc.org/egg/noise|noise]] egg.
41
42
43=== Version history
44
45==== Version 0.2.0
4615 March 2019
47
48* Documentation
49* Fix some incorrect identifier renaming
50
51
52==== Version 0.1.0
534 November 2018
54
55* Initial release based on libepoxy 1.5.3
56
57
58=== Source repository
59Source available in [[https://www.upyum.com/cgit.cgi/epoxy|a git repository]].
60
61Bug reports and patches welcome! Bugs can be reported to kooda@upyum.com
62
63
64=== Author
65Adrien (Kooda) Ramos
66
67Based on previous work by Alex Charlton.
68
69
70=== Licence
71BSD
72
Note: See TracBrowser for help on using the repository browser.