vertexware | ||
home | details | screenshots |
Framework architecture
vertexware system consists of single kernel module and any number of specific plugin modules. Plugin modules are implemented as dynamic link libraries (DLL). Kernel is the only directly executable component. It performs common initialization / shutdown tasks, manages some global objects, connects various modules / objects and implements outer execution loops (dynamic reconfiguration loop, main loop). Plugin types currently defined by framework:
GenericExtension plugin
Purpose of GenericExtension is generic dynamic binding of objects that implement externally defined interfaces to application object. Essentially, it's just a convenient way to package the specific implementation of any interface into a DLL.
DirectInputProxy plugin
Plugin type used by kernel only. Enables dynamic binding to specific version of DirectInput API.
HumanInterfaceDeviceDriver plugin
Virtual driver interface. Virtual drivers map DirectInput or vendor-specific interfaces to an interfaces defined by framework, which makes access to device data more convenient and consistent. Sampling of input devices is performed through HumanInterfaceDevice interface. Sampling can be synchronous, or asynchronous (uses different thread). Asynchronous sampling is recommended for devices with low sampling rates, because it reduces negative impact of sampling delay on overall application performance. To access the sampled data, application uses specialized HIDController interfaces (HIDController objects are contained by HumanInterfaceDevice object). HIDController objects can also be used for sending data to a device (e.g. force-feedback commands).
HIDController interfaces currently defined by framework:
- Keyboard
- Mouse
- GameController
- OrientationTracker
- PositionTracker
- Glove
VideoSubsystem plugin
VideoSubsystem simplifies low-level aspects of using the graphics API. Its tasks include initialization and shutdown of the video window, frame-buffer setup, back-buffer presentation, dynamic vertical synchronization update, graphics API reset and simple read-only access to frame-buffer contents. Application object never communicates directly with VideoSubsystem. Instead, it uses proxy methods of VideoRenderer or Kernel interface.
VideoRenderer plugin
Base interface from which users can derive any kind of higher-level rendering interface. However, most of the time it serves as a proxy to low-level graphics API-s with some added functionality (e.g. VideoRendererOpenGL automatically initializes some OpenGL extension pointers). VideoRenderer contains additional object that implements GUI-Renderer interface. GUI-Renderer simplifies the implementation of GUI-subsystem and associated interfaces such as GUI-Shader.
Application plugin
Application plugins implement application-specific part of execution protocols defined by Kernel / Application interfaces (startup, configuration, and main loop).
Additional interfaces and tools
Some of the tools are directly tied to the framework protocols, while others can be used independently. Most interesting tools are the following:
Profiler
Used for real-time measurement of application performance. Measurement blocks are defined by writing a single line of code. Profiling can be turned on / off at any time.
DataCodecManager
Backbone of extensible file IO system. Any kind of data IO can be performed through codec (coder-decoder) objects. Codec objects are registered by application or kernel. Built-in codecs can handle the following image formats: jpeg, png, tiff, bmp. However, codecs are not limited to pixel-data, additional data categories can be defined (e.g. for reading / writing 3D-model formats).
GUI Renderer / Manager / Component / Shader
Framework incorporates custom GUI subsystem. Components encapsulate the behavior of a GUI object. Shaders define the visual properties of specific component. This separation allows for more flexible system. To change the look of any component, it is not necessary to derive new components and reimplement all the behavioral complexity along with the rendering code. Instead, you create new shader class which turns out to be much simpler programming task. GUI-Renderer interface and associated constructs encapsulate the lowest common denominator (but sufficient for GUI rendering) functionality provided by standard low-level API-s. Text rendering is supported. Manager takes care of input event processing (keyboard & mouse only), event dispatch and proper drawing of GUI object hierarchy. It also provides useful services to GUI components. Platform provides standard component / shader set.
CommandInterpreter / standard commands / VariableRegistry
CommandInterpreter is utility object that parses command-lines and passes the results to one of the registered commands. Interpreter must be connected to GUI-console object to operate. A few useful standard commands are provided by platform itself (e.g. change video settings). Commands provide the simplest way of implementing run-time parameterization and configuration useful to developer. VariableRegistry extends the concept of run-time parameterization by allowing the update of any registered variable through console interface. For example, it can be useful for tweaking algorithm parameters or checking the behavior of algorithm under a different set of conditions.