osgPPU::UnitInOutModule Class Reference

Apply some loaded module on the input texture to compute the output. More...

Inheritance diagram for osgPPU::UnitInOutModule:

osgPPU::UnitInOut osgPPU::Unit

Public Types

typedef bool(* OSGPPU_MODULE_ENTRY )(UnitInOutModule *)
typedef void(* OSGPPU_MODULE_RELEASE )(void)

Public Member Functions

 META_Node (osgPPU, UnitInOutModule)
 UnitInOutModule (const UnitInOutModule &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
virtual ~UnitInOutModule ()
 Release it and used memory.
virtual bool loadModule (const std::string &moduleFile)
virtual void setModule (Module *module)
virtual void removeModule ()
 Remove currently used module.
const std::string & getModuleFile () const
 Get last loaded module file name.
ModulegetModule ()
 Get currently loaded module.
const ModulegetModule () const
void init ()
 Initialze the default Processor unit.

Protected Member Functions

virtual bool noticeBeginRendering (osg::RenderInfo &, const osg::Drawable *)
 Start cuda kernel running over the input textures.
virtual void noticeFinishRendering (osg::RenderInfo &, const osg::Drawable *)
 Stop cuda kernel execution and write results to the output textures.

Protected Attributes

bool _moduleDirty
osg::ref_ptr
< osgDB::DynamicLibrary > 
_moduleLib
std::string _moduleFile
Module_module
 We do not handle the destruction and release of module, because it has to be made in the address space of loaded module.

Data Structures

class  Module

Detailed Description

Apply some loaded module on the input texture to compute the output.

UnitInOutModule does load a module from a dynamic library which is capable of doing processing operations on the input data. Such a module could be for example a cuda processing module which process the input by cuda.


Member Function Documentation

virtual bool osgPPU::UnitInOutModule::loadModule ( const std::string &  moduleFile  )  [virtual]

Specify the file name of a dynamic libray containg the module. A method "osgppuInitModule" has to be present in the library. To the method pointer of this unit will be passed to let it setup himself properly.

Returns:
true if loading was successful

virtual void osgPPU::UnitInOutModule::setModule ( Module module  )  [virtual]

Set module which will be used to process the input data.


The documentation for this class was generated from the following file:

Back to Homepage of osgPPU

Copyright (C) 2008 by Art Tevs (LGPL)