Cave Software Overview

From VrlWiki
Revision as of 13:42, 21 September 2009 by Brad Berg (talk | contribs)
Jump to navigation Jump to search

Software layers for the Cave

                         3D Application

               Scene Graph, GUI, Scripting & VRG3D

                            G3D & QT

                          SDL  or  HID

               Windows/directx  or  Linux/X11  or  Os X/Dsp

                            OpenGL

                        CPU         GPU


VRG3D

VRG3D implements an API for developing virtual reality applications. It uses G3D for managing lower layers. The source code currently resides at Brown. It is probably out of sych with supported G3D releases. A consideration is to establish support for VRG3D consistent with supported versions of G3D.

http://vis.cs.brown.edu/resources/doc/VRG3D/index.html


G3D

http://g3d-cpp.sourceforge.net/manual/guideoverview.html

G3D makes low-level libraries like OpenGL and sockets easier to use without limiting functionality or performance.

+ You can use pieces of the library without the whole.

+ Allows bypass to lower layers. You can always execute OpenGL functions directly and mix them with RenderDevice calls.

G3D is built on OpenGL because it is platform independent and allows access to newer features than DirectX. Unlike higher level engines G3D does not restrict access to low-level features-- every graphics card function in OpenGL is exposed under G3D, even if it isn't wrapped by a higher level API. This means you can always drop down to raw OpenGL calls if needed.

Although G3D provides its own native window management, you can use the G3D::OSWindow API to replace that with GUI libraries, likw wxWindows and Qt.

It is possible to use DirectX instead of OpenGL. The easiest way is to link against G3D.lib only and use DirectX calls instead of the GLG3D equivalents. A more full-featured solution is to replace the RenderDevice and Texture implementations with DirectX versions and rebuild the entire library. We have not investigated the latter.

G3D uses zlib, libpng, libzip, and libjpeg, which are distributed as part of G3D (as headers and a windows .libs).

On Linux and FreeBSD, G3D::SDLWindow uses SDL. SDL is not included with the G3D installation and must be downloaded separately from http://libsdl.org if it is not installed on your machine already.

In addition to those mentioned above, you may be interested in using the following libraries to complement G3D:

SDL

http://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.

  • Video
  • Events
  • Audio
  • CD-ROM audio
  • Threads
  • Timers
  • Endian independence

You can set the environment variable "SDL_VIDEODRIVER" to the name of the driver you want to use. The drivers available depend on the platform and SDL compile-time options. Here is a partial list for some platforms:

  • Linux:
    • x11 - (default) Use the X11 windowing system
    • dga - Use XFree86 DGA 2.0 for fullscreen hardware acceleration
    • fbcon - Use the framebuffer console
    • directfb - Use the DirectFB API
    • svgalib - Use the SVGAlib API
    • ggi - Use the General Graphics Interface API
    • aalib - Use the Ascii Art library
  • Win32:
    • directx - (default) Use the DirectDraw API
    • windib - Use the standard Win32 GDI


SDL supports Linux, Windows, Windows CE, BeOS, MacOS, Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX.

The code contains support for AmigaOS, Dreamcast, Atari, AIX, OSF/Tru64, RISC OS, SymbianOS, and OS/2, but these are not officially supported.

SDL is written in C, but works with C++ natively, and has bindings to several other languages, including Ada, C#, D, Eiffel, Erlang, Euphoria, Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, Pike, Pliant, Python, Ruby, Smalltalk, and Tcl.


HID

The USB HID class is defined in a number of documents provided by the USB Implementers Forum's Device Working Group. The primary document used to describe the USB HID class is the Device Class Definition for HID:

http://www.usb.org/developers/devclass_docs/HID1_11.pdf

There are two levels of APIs related to USB HID: the USB level and the operating system level. At the USB level, there is a protocol for devices to announce their capabilities and the operating system to parse the data it gets. The operating system then offers a higher-level view to applications, which do not need to include support for individual devices but for classes of devices. This abstraction layer allows a game to work with any USB controller, for example, even ones created after the game.

  • Microsoft Related HID Documentation:

http://www.usb.org/developers/hidpage/microhid/


  • Linux Related HID Documentation:

http://www.linux-usb.org/USB-guide/x194.html