Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the glop Reference Manual, version 0.1.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 16:13:01 2021 GMT+0.
• Introduction | What glop is all about | |
• Systems | The systems documentation | |
• Modules | The modules documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
The goal is to provide simple OpenGL window and context manipulation code as well as system input handling (i.e. mouse & keyboard).
Direct FFI bindings to system functions are used so no third party C lib is required except system libraries.
The following list is just here for information and is certainly not meant to be exhaustive and/or up-to-date.
Tested platforms:
Win32
: WindowsXP SP2X11
: Linux64OSX
: OSX 10.6The following combinations have been tested sucessfully for GL 2.X:
The following combination are known to fail:
Make sure glop.asd
and glop-test.asd
are in a location known to asdf and run:
(asdf:operate 'asdf:load-op :glop-test)
Then you can run an hello world test with:
(glop-test:test-gl-hello)
Available tests are:
test-manual-create
: manual window create/destroytest-multiple-contexts
: multiple OpenGL contexts for a single windowtest-with-window
: glop:with-window macro usagetest-manual-events
: manual event dispatchingtest-gl-hello
: cl-opengl hello world exampletest-gl-hello-fullscreen
: same in fullscreentest-gl-hello-gl3
: same with OpenGL 3.x contexttest-multiple-windows
: two hello world windows each one with its own GL contexttest-on-event
: hello world using the on-event dispatch codetest-subclassing
: how to make your own window class and use itIn all tests except test-manual-events
you can press the following keys:
To use glop, make sure glop.asd
is in a location known to asdf and run:
(asdf:operate 'asdf:load-op :glop)
Now you can just do:
(glop:with-window (win "My title" 800 600)
;; gl init code here
(loop while (glop:dispatch-events win :blocking nil) do
;; gl code here
(glop:swap-buffers win)))
The glop:dispatch-events
macro will take care of processing glop events and call corresponding
methods. Generic functions for these methods are:
(on-key window pressed keycode keysym string)
(on-button window pressed button)
(on-mouse-motion window x y dx dy)
(on-resize window new-width new-height)
(on-draw window)
(on-close window)
None of them have a default definition, so you should implement all these methods in you application.
There's another method based dispatch mechanism with the on-event
generic function.
To use it just pass :on-foo nil
to glop:dispatch-events
.
In that case the (on-event window event)
method will be called instead of on-foo
methods.
The glop:dispatch-events
macro isn't mandatory and you can use your own event dispatch code,
see glop-test:test-manual-events
for an example of how to do this.
You may also completely bypass glop's event handling mechanism and use your own,
see glop-test:test-custom-event-loop
(X11 only) for a simple example of how it may be done.
Basically just don't call any of glop's event related functions and do the work yourself.
See test.lisp
for more details.
OsX support is still experimental.
GL 3.x contexts are known to work on Linux and there should be experimental support those on Win32 (not tested).
See also issues on github.
Patches and improvements are welcome :=)
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The glop system |
Morgan Veyret
MIT
Direct FFI bindings for OpenGL window and context management
0.1.0
glop.asd (file)
src (module)
Modules are listed depth-first from the system components tree.
• The glop/src module | ||
• The glop/src/x11 module |
Next: The glop/src/x11 module, Previous: Modules, Up: Modules [Contents][Index]
glop (system)
src/
Previous: The glop/src module, Up: Modules [Contents][Index]
utils.lisp (file)
src (module)
src/x11/
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
Next: The glop/src/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
glop.asd
glop (system)
Next: The glop/src/utils․lisp file, Previous: The glop․asd file, Up: Lisp files [Contents][Index]
Next: The glop/src/x11/package․lisp file, Previous: The glop/src/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
src (module)
src/utils.lisp
Next: The glop/src/x11/keysymdef․lisp file, Previous: The glop/src/utils․lisp file, Up: Lisp files [Contents][Index]
Next: The glop/src/x11/xlib․lisp file, Previous: The glop/src/x11/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
x11 (module)
src/x11/keysymdef.lisp
Next: The glop/src/x11/xkb․lisp file, Previous: The glop/src/x11/keysymdef․lisp file, Up: Lisp files [Contents][Index]
keysymdef.lisp (file)
x11 (module)
src/x11/xlib.lisp
Next: The glop/src/x11/xcomposite․lisp file, Previous: The glop/src/x11/xlib․lisp file, Up: Lisp files [Contents][Index]
xlib.lisp (file)
x11 (module)
src/x11/xkb.lisp
xkb-set-detectable-auto-repeat (function)
Next: The glop/src/x11/glx․lisp file, Previous: The glop/src/x11/xkb․lisp file, Up: Lisp files [Contents][Index]
xkb.lisp (file)
x11 (module)
src/x11/xcomposite.lisp
Next: The glop/src/x11/display-ctrl․lisp file, Previous: The glop/src/x11/xcomposite․lisp file, Up: Lisp files [Contents][Index]
xcomposite.lisp (file)
x11 (module)
src/x11/glx.lisp
Next: The glop/src/x11/glop-x11․lisp file, Previous: The glop/src/x11/glx․lisp file, Up: Lisp files [Contents][Index]
glx.lisp (file)
x11 (module)
src/x11/display-ctrl.lisp
Next: The glop/src/glop․lisp file, Previous: The glop/src/x11/display-ctrl․lisp file, Up: Lisp files [Contents][Index]
display-ctrl.lisp (file)
x11 (module)
src/x11/glop-x11.lisp
Previous: The glop/src/x11/glop-x11․lisp file, Up: Lisp files [Contents][Index]
x11 (module)
src (module)
src/glop.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The glop package | ||
• The glop-glx package | ||
• The glop-xlib package |
Next: The glop-glx package, Previous: Packages, Up: Packages [Contents][Index]
package.lisp (file)
common-lisp
Next: The glop-xlib package, Previous: The glop package, Up: Packages [Contents][Index]
package.lisp (file)
Previous: The glop-glx package, Up: Packages [Contents][Index]
package.lisp (file)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported special variables | ||
• Exported macros | ||
• Exported functions | ||
• Exported generic functions | ||
• Exported classes |
Next: Exported macros, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
When set to NIL, holding a key press will generate a sequence of key-press events. Otherwise, only one key-press event will be triggered.
utils.lisp (file)
Next: Exported functions, Previous: Exported special variables, Up: Exported definitions [Contents][Index]
Process all pending system events and call corresponding methods.
When :blocking is non-nil calls event handling func that will block
until an event occurs.
Returns NIL on :CLOSE event, T otherwise.
Creates a window and binds it to WIN-SYM. The window is detroyed when body exits.
Next: Exported generic functions, Previous: Exported macros, Up: Exported definitions [Contents][Index]
Creates a new window with an attached GL context using the provided
visual attributes.
Major and minor arguments specify the context version to use. When
NIL (default value) old style gl context creation is used. Some
combinations of platforms and drivers may require :PROFILE :CORE to
use versions newer than 2.1, while others will use newest version
even if version is not specified.
The created window will be of the WINDOW class, you can override this by specifying your own class using :WIN-CLASS.
display-ctrl.lisp (file)
Destroy the provided window and any attached GL context.
Get foreign pointer to the GL extension designed by PROC-NAME.
glop-x11.lisp (file)
utils.lisp (file)
(setf key-pressed) (setf expander)
utils.lisp (file)
key-pressed (function)
utils.lisp (file)
Push an artificial :close event into the event processing system.
Push an artificial event into the event processing system. Note that this has no effect on the underlying window system.
Make WINDOW current for GL rendering.
display-ctrl.lisp (file)
display-ctrl.lisp (file)
Attempt to change display mode to the mode closest to geometry and set window fullscreen state.
Next: Exported classes, Previous: Exported functions, Up: Exported definitions [Contents][Index]
Makes CTX the current OpenGL context and attach it to WINDOW.
glop.lisp (file)
glop-x11.lisp (file)
Closes the provided window *without* releasing any attached GL context.
glop.lisp (file)
glop-x11.lisp (file)
Creates a new OpenGL context of the specified version for the provided window
and optionally make it current (default). If major and minor are NIL old style context creation
is used. Otherwise a context compatible with minimum major.minor version is created.
If you request a specific context version, you may use the additional arguments to setup
context options.
The foward-compat argument specify whether to disallow legacy functionalities (only for
GL version >= 3.0). The debug argument specify whether a debug context should be created.
You may request a specific context profile by specifiying either
:core or :compat as the profile argument value.
glop.lisp (file)
glop-x11.lisp (file)
Returns the current video mode.
glop.lisp (file)
glop-x11.lisp (file)
Detach and release the provided OpenGL context.
glop.lisp (file)
glop-x11.lisp (file)
Make the provided OpenGL context no longer current.
glop.lisp (file)
glop-x11.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
Disable cursor display for WINDOW
glop.lisp (file)
glop-x11.lisp (file)
Make WINDOW not visible.
glop.lisp (file)
glop-x11.lisp (file)
Returns a list of all available video modes as a list video-mode structs.
glop.lisp (file)
glop-x11.lisp (file)
’Maximize’ a window to fill screen, without changing screen mode or window decoractions.
Returns next available event for manual processing. If :blocking is true, wait for an event.
Creates a new window *without* any GL context.
glop.lisp (file)
glop-x11.lisp (file)
Remove window border, title, etc. if possible.
Undo the effects of MAXIMIZE-WINDOW
Restore window border, title, etc.
Set window to fullscreen state.
glop.lisp (file)
glop-x11.lisp (file)
Configure window geometry.
glop.lisp (file)
glop-x11.lisp (file)
Attempts to set the provided video mode.
glop.lisp (file)
glop-x11.lisp (file)
Set WINDOW title to TITLE.
glop.lisp (file)
glop-x11.lisp (file)
Enable cursor display for WINDOW
glop.lisp (file)
glop-x11.lisp (file)
Make WINDOW visible. (may need to be called twice when window is shown for the first time on Windows.)
glop.lisp (file)
glop-x11.lisp (file)
Swaps GL buffers.
glop.lisp (file)
glop-x11.lisp (file)
Specify number of vsync intervals to wait before swap-buffers takes effect.
Use 0 for no vsync, 1 for normal vsync, 2 for 1/2 monitor refresh rate, etc.
If INTERVAL is negativem the absolute value is used, and when
supported swap won’t wait for vsync if specified interval has already
elapsed.
May be ignored or only partially supported depending on platform and user settings.
automatically generated reader method
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
automatically generated reader method
utils.lisp (file)
glop.lisp (file)
automatically generated reader method
utils.lisp (file)
glop.lisp (file)
automatically generated reader method
utils.lisp (file)
glop.lisp (file)
automatically generated reader method
utils.lisp (file)
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
Mouse button press or release.
glop.lisp (file)
event (class)
:button
button (generic function)
:pressed
pressed (generic function)
Mouse button press.
glop.lisp (file)
button-event (class)
Initarg | Value |
---|---|
:pressed | t |
Mouse button release.
glop.lisp (file)
button-event (class)
Initarg | Value |
---|---|
:pressed | nil |
Window closed.
Common ancestor for all events.
glop.lisp (file)
standard-object (class)
Window expose.
Window focus state changed.
glop.lisp (file)
event (class)
:focused
focused (generic function)
Window received focus.
glop.lisp (file)
focus-event (class)
Initarg | Value |
---|---|
:focused | t |
Window lost focus.
glop.lisp (file)
focus-event (class)
Initarg | Value |
---|---|
:focused | nil |
Keyboard key press or release.
glop.lisp (file)
event (class)
:keycode
keycode (generic function)
:keysym
keysym (generic function)
:text
text (generic function)
:pressed
pressed (generic function)
Keyboard key press.
Keyboard key release.
Mouse motion.
Window resized.
Window visibility changed.
glop.lisp (file)
event (class)
:visible
visible (generic function)
Window was fully obscured.
glop.lisp (file)
visibility-event (class)
Initarg | Value |
---|---|
:visible | nil |
Window was unobscured.
glop.lisp (file)
visibility-event (class)
Initarg | Value |
---|---|
:visible | t |
utils.lisp (file)
x11-window (class)
:x
0
window-x (generic function)
(setf window-x) (generic function)
:y
0
window-y (generic function)
(setf window-y) (generic function)
:width
100
window-width (generic function)
(setf window-width) (generic function)
:height
100
window-height (generic function)
(setf window-height) (generic function)
:title
"glop"
window-title (generic function)
(setf window-title) (generic function)
window-gl-context (generic function)
(setf window-gl-context) (generic function)
window-pushed-event (generic function)
(setf window-pushed-event) (generic function)
window-fullscreen (generic function)
(setf window-fullscreen) (generic function)
window-previous-video-mode (generic function)
(setf window-previous-video-mode) (generic function)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal constants | ||
• Internal special variables | ||
• Internal macros | ||
• Internal functions | ||
• Internal generic functions | ||
• Internal conditions | ||
• Internal structures | ||
• Internal classes |
Next: Internal special variables, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
Next: Internal macros, Previous: Internal constants, Up: Internal definitions [Contents][Index]
utils.lisp (file)
Next: Internal functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
utils.lisp (file)
utils.lisp (file)
utils.lisp (file)
Next: Internal generic functions, Previous: Internal macros, Up: Internal definitions [Contents][Index]
Real next-event implementation.
glop-x11.lisp (file)
utils.lisp (file)
xcomposite.lisp (file)
xcomposite.lisp (file)
Try to find the closest video mode matching desired parameters within modes-list. Returns NIL if no match is found.
glop-x11.lisp (file)
utils.lisp (file)
utils.lisp (file)
glop-x11.lisp (file)
glop-x11.lisp (file)
glop-x11.lisp (file)
glop-x11.lisp (file)
utils.lisp (file)
utils.lisp (file)
utils.lisp (file)
Process an X11 event into a GLOP event.
utils.lisp (file)
utils.lisp (file)
utils.lisp (file)
utils.lisp (file)
utils.lisp (file)
utils.lisp (file)
xcomposite.lisp (file)
xcomposite.lisp (file)
xcomposite.lisp (file)
xcomposite.lisp (file)
xcomposite.lisp (file)
xcomposite.lisp (file)
xcomposite.lisp (file)
xcomposite.lisp (file)
xcomposite.lisp (file)
xcomposite.lisp (file)
xcomposite.lisp (file)
Returns the input string corresponding to a keypress.
utils.lisp (file)
utils.lisp (file)
utils.lisp (file)
display-ctrl.lisp (file)
display-ctrl.lisp (file)
display-ctrl.lisp (file)
display-ctrl.lisp (file)
display-ctrl.lisp (file)
display-ctrl.lisp (file)
display-ctrl.lisp (file)
display-ctrl.lisp (file)
Next: Internal conditions, Previous: Internal functions, Up: Internal definitions [Contents][Index]
automatically generated reader method
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
glop.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
automatically generated reader method
utils.lisp (file)
automatically generated writer method
utils.lisp (file)
Next: Internal structures, Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
Any glop specific error should inherit this.
utils.lisp (file)
error (condition)
not-implemented (condition)
Unimplemented.
utils.lisp (file)
glop-error (condition)
Next: Internal classes, Previous: Internal conditions, Up: Internal definitions [Contents][Index]
glop-x11.lisp (file)
structure-object (structure)
glx-context-ctx (function)
(setf glx-context-ctx) (function)
glx-context-display (function)
(setf glx-context-display) (function)
utils.lisp (file)
x11-video-mode (structure)
set-video-mode (method)
integer
0
video-mode-width (function)
(setf video-mode-width) (function)
integer
0
video-mode-height (function)
(setf video-mode-height) (function)
integer
0
video-mode-depth (function)
(setf video-mode-depth) (function)
utils.lisp (file)
structure-object (structure)
video-mode (structure)
integer
0
x11-video-mode-rate (function)
(setf x11-video-mode-rate) (function)
integer
-1
x11-video-mode-index (function)
(setf x11-video-mode-index) (function)
Previous: Internal structures, Up: Internal definitions [Contents][Index]
glop.lisp (file)
child-event (class)
:parent
parent (generic function)
:x
x (generic function)
:y
y (generic function)
:width
width (generic function)
:height
height (generic function)
glop.lisp (file)
child-event (class)
:parent
parent (generic function)
Status of child window changed.
glop.lisp (file)
event (class)
child (method)
:child
child (generic function)
glop.lisp (file)
child-event (class)
:parent
parent (generic function)
:x
x (generic function)
:y
y (generic function)
Child window resized.
Child window visibility changed.
glop.lisp (file)
child-event (class)
:visible
visible (generic function)
Child window was fully obscured.
glop.lisp (file)
child-visibility-event (class)
Initarg | Value |
---|---|
:visible | nil |
Child window was unobscured.
glop.lisp (file)
child-visibility-event (class)
Initarg | Value |
---|---|
:visible | t |
xlib.lisp (file)
standard-object (class)
glop-xlib::name
name (generic function)
glop-xlib::opcode
opcode (generic function)
glop-xlib::event-base
event-base (generic function)
glop-xlib::error-base
error-base (generic function)
utils.lisp (file)
standard-object (class)
:uninitialized
swap-interval-function (generic function)
(setf swap-interval-function) (generic function)
swap-interval-tear (generic function)
(setf swap-interval-tear) (generic function)
utils.lisp (file)
standard-object (class)
window (class)
:display
x11-window-display (generic function)
(setf x11-window-display) (generic function)
:screen
x11-window-screen (generic function)
(setf x11-window-screen) (generic function)
x11-window-id (generic function)
(setf x11-window-id) (generic function)
x11-window-visual-infos (generic function)
(setf x11-window-visual-infos) (generic function)
x11-window-fb-config (generic function)
(setf x11-window-fb-config) (generic function)
x11-window-cursor (generic function)
(setf x11-window-cursor) (generic function)
display-ctrl.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F G L M |
---|
Jump to: | F G L M |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
(
A B C D E F G H K L M N O P R S T V W X Y |
---|
Jump to: | %
(
A B C D E F G H K L M N O P R S T V W X Y |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | %
*
+
B C D E F G H I K N O P R S T V W X Y |
---|
Jump to: | %
*
+
B C D E F G H I K N O P R S T V W X Y |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | _
B C E F G K M N P R S V W X |
---|
Jump to: | _
B C E F G K M N P R S V W X |
---|