|
Revision 13172, 1.0 kB
(checked in by robert, 79 minutes ago)
|
|
Added assigned of the InteractiveImageHandler? as a cull callback to enable the interactive image to know when it's being actively used as part of rendering a frame.
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | #include <osg/Notify> |
|---|
| 7 | |
|---|
| 8 | #include <osgDB/FileNameUtils> |
|---|
| 9 | #include <osgDB/Registry> |
|---|
| 10 | |
|---|
| 11 | #include "JoystickDevice.h" |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | class 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 | |
|---|
| 37 | |
|---|
| 38 | REGISTER_OSGPLUGIN(sdl, ReaderWriterSDL) |
|---|