root/OpenSceneGraph/trunk/src/osgPlugins/sdl/ReaderWriterSDL.cpp @ 13172

Revision 13172, 1.0 kB (checked in by robert, 22 hours ago)

Improved handling of setting of the depth of the UI.

Line 
1// Released under the OSGPL license, as part of the OpenSceneGraph distribution.
2//
3// ReaderWriter for sgi's .rgb format.
4// specification can be found at http://local.wasp.uwa.edu.au/~pbourke/dataformats/sgirgb/sgiversion.html
5
6#include <osg/Notify>
7
8#include <osgDB/FileNameUtils>
9#include <osgDB/Registry>
10
11#include "JoystickDevice.h"
12
13
14class ReaderWriterSDL : public osgDB::ReaderWriter
15{
16    public:
17
18        ReaderWriterSDL()
19        {
20            supportsExtension("sdl","SDL Device Integration");
21        }
22
23        virtual const char* className() const { return "SDL Device Integration plugin"; }
24
25        virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* options =NULL) const
26        {
27            if (file=="joystick.sdl")
28            {
29                return new JoystickDevice;
30            }
31            return ReadResult::FILE_NOT_HANDLED;
32        }
33
34};
35
36// now register with Registry to instantiate the above
37// reader/writer.
38REGISTER_OSGPLUGIN(sdl, ReaderWriterSDL)
Note: See TracBrowser for help on using the browser.