source: project/wiki/gl-display @ 3245

Last change on this file since 3245 was 3245, checked in by anonymous, 13 years ago


File size: 2.2 KB
Line 
1[[toc:]]
2[[tags: egg]]
3
4== Introduction
5
6> Note: ''This is a draft document for early discussion.''
7
8The {{gl-display}} API defines a set of basic functions
9to create windows with OpenGL context, and access
10keyboard, mouse and window manager events.
11
12It should be possible to provide implementations on top
13of bare windowing systems or full-featured GUI libraries.
14
15== Interface
16
17=== Level 0
18
19The egg must register the feature {{'gl-display-level-0}}
20to be used with cond-expand and #+, and provides the
21following functions.
22
23* gl-display:create
24* gl-display:kill
25* gl-display:swap
26* gl-display:receive-event
27* gl-display:event-type
28* gl-display:event-x
29* gl-display:event-y
30* gl-display:event-time
31* gl-display:event-key
32* gl-display:width
33* gl-display:height
34* gl-display:screen-width
35* gl-display:screen-height
36
37==== gl-dispay:create
38
39 [procedure] (gl-display:create [PROPERTIES])
40
41Creates and returns a (window-manager level) window with an OpenGL context
42or #f on failure. PROPERTIES is a list of symbols and numbers. If the
43list is the empty list, the created window has a (window-manager) border,
44a width of 100 pixels and a height of 100 pixels. The width, height,
45horizontal and vertical positions can be specified with a symbol followed by
46a number. The following additional symbols can also be used :
47
48* full-screen
49* ...
50
51The full-screen property is meant to create a window with the same size as
52the screen, not to change the screen resolution to match the window size.
53As such, if both window size and full-screen are given, the size information
54is discarded.
55
56Example usage :
57
58 (gl-display:create 'width 320 'height 240 'no-border)
59
60==== gl-display:swap
61
62 [procedure] (gl-display:swap DISPLAY)
63
64Swaps the back buffer with the front buffer for a double buffering
65context or call glFlush for a single buffering context.
66
67== TODO
68
69* level based features (see Tony's proposal on the Chicken mailing-list :
70[[http://lists.gnu.org/archive/html/chicken-users/2007-02/msg00259.html]]).
71* in addition of features, discussion about possible versioning mechanisms.
72* color, depth, ... for the properties of gl-display:create.
73
74== Authors
75
76[[vo minh thu]]
77
78== Version History
79
80; 0.1 : initial release (not yet, waiting for contributions before 0.1)
81
Note: See TracBrowser for help on using the repository browser.