MFSM || GlutIO module

Alexandre R.J. François

Module version: 0.3
FSF code version: 0.8
ARJF © 2007

contents

Description
Reference guide
Index

description

The GlutIO module encapsulates the GL Utility Toolkit (GLUT) for OpenGL rendering, keyboard, mouse and joystick input (joystick not supported on all platforms by GLUT API implementations).

The module is in theory cross-platform. A compilation variable corresponding to the target platform must be set at compilation time. Possible values are GLUTIO_CARBON (Mac OS X), GLUTIO_X11 (linux/X11), and GLUTIO_WIN32 (win32). So far however, the module has only been successfully tested on Mac OS X and on win32 platforms. The X11 version is currently not functional; the source of the problem remains under investigation...

The module implements two main classes of functionalities present in the GLUT API: creation and management of a GLUT-controlled OpenGL rendering context, and handling and processing of interaction events generated by control devices.

GLUT encapsulation

The CGlutIO class encapsulates the setup and operation of a single GLUT-managed OpenGL rendering context. Most of the challenges (and limitations of the resulting module elements) result from the sharing of the context among multiple threads.

Control devices

the GLUT API defines mechanisms to handle and process events produced by input devices: keyboard, mouse and joystick (the joystick API is not implemented for all platforms. The GlutIO module encpasulates these functionalities and integrates them in the SAI framework. The module defines event nodes for each input modality, and input cells that generate the corresponding objects on an active stream in response to a trigger by the appropriate GLUT callback.

reference guide

GlutIO module elements are defined in the glutio namespace. This section lists all the elements defined in the Image module, in alphabetical order.

CGlutIO

Encapsulate GLUT API for events and rendering context management. Implements the singleton pattern: only one instance can exist at any time.

Data members

Mac OS X
X11
Win32

Member functions

Singleton instance management
Callbacks
Context switching
Data access
Main loop

CKeyboardEvent (fsf::CNode) "GLUTIO_KEYBOARD_EVENT"

Keyboard event node. Data corresponds to GLUT API.

Data members

Member functions

Constructors, destructor and other functions that are part of any derived node class
Data access

CKeyboardInput (fsf::CCell) "GLUTIO_KEYBOARD_INPUT"

Active filter[FSF_ACTIVE_PULSE "Root"]
Passive filter[FSF_PASSIVE_PULSE "Root"]
Output(x (GLUTIO_KEYBOARD_EVENT "Keyboard event"))

Keyboard input cell: generate keyboard events on callback from the GLUT main loop. The Process() member function is not used (and thus not overloaded).

Member functions

Constructors, destructor and other functions that are part of any derived cell class
Active stream processing

CMouseEvent (fsf::CNode) "GLUTIO_MOUSE_EVENT"

Mouse event node. Data corresponds to GLUT API.

Data members

Member functions

Constructors, destructor and other functions that are part of any derived node class
Data access

CMouseInput (fsf::CCell) "GLUTIO_MOUSE_INPUT"

Active filter[FSF_ACTIVE_PULSE "Root"]
Passive filter[FSF_PASSIVE_PULSE "Root"]
Output(x (GLUTIO_MOUSE_EVENT "Keyboard event"))

Mouse input cell: generate mouse events on callback from the GLUT main loop. The Process() member function is not used (and thus not overloaded).

Member functions

Constructors, destructor and other functions that are part of any derived cell class
Active stream processing

RegisterFactories()

Registers the factories for the nodes and cells defined in the module, with the unique system instance.

index

C

R

ARJF © 2007