[osg-users] Returning FILE_REQUESTED from a ReaderWriter

2018-12-15 Thread Aaron Andersen
Hello,

Mostly out of curiosity I'm wondering if there are any examples of ReaderWriter 
classes which actually return FILE_REQUESTED:

FILE_REQUESTED, //!< Asynchronous file read has been requested, but returning 
immediately, keep polling plugin until file read has been completed.

Has anyone ever used this? Is there an example I've missed?

Thanks___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Texturing with GLBeginEndAdapter

2016-12-29 Thread Aaron Andersen

Hello TanZJ,

Thank you for the information. I don't think I quite understood your  
intention though. I apologize if this is obvious but as I said my  
OpenGL skills are lacking... Here is my code after applying your  
suggestion about applying the texture to the state:


class MyDrawable {
osg::ref_ptr texture[3];
public:
MyDrawable()
{
for (int i : {0, 1, 2})
{
const std::string filename = std::to_string(i + 1) + ".png";

if (osg::Image * image = osgDB::readImageFile(filename))
{
texture[i] = new osg::Texture2D;
texture[i]->setImage(image);
}
else
{
std::cerr << "ERROR LOADING IMAGE " << filename << std::endl;
}
}
}

virtual void drawImplementation(osg::RenderInfo & renderInfo)  
const override

{
const float Z = 0.f;

osg::State * state = renderInfo.getState();
osg::GLBeginEndAdapter & gl = state->getGLBeginEndAdapter();

state->setActiveTextureUnit(0);

gl.Color4f(1.f, 1.f, 1.f, 1.f);

float x = 50.f, y = 50.f, w = 64.f, h = 64.f, offset;

offset = 0.f;

// apply the first texture so it will draw on the first rect
texture[0]->apply(*state);
gl.Begin(GL_QUADS);
gl.TexCoord2f(0.f, 0.f);
gl.Vertex3f(offset + x, y, Z);
gl.TexCoord2f(0.f, 1.f);
gl.Vertex3f(offset + x + w, y, Z);
gl.TexCoord2f(1.f, 1.f);
gl.Vertex3f(offset + x + w, y + h, Z);
gl.TexCoord2f(1.f, 0.f);
gl.Vertex3f(offset + x, y + h, Z);
gl.End();

offset = 256.f;

// apply the second texture so it will draw on the second rect
texture[1]->apply(*state);
gl.Begin(GL_QUADS);
gl.TexCoord2f(0.f, 0.f);
gl.Vertex3f(offset + x, y, Z);
gl.TexCoord2f(0.f, 1.f);
gl.Vertex3f(offset + x + w, y, Z);
gl.TexCoord2f(1.f, 1.f);
gl.Vertex3f(offset + x + w, y + h, Z);
gl.TexCoord2f(1.f, 0.f);
gl.Vertex3f(offset + x, y + h, Z);
gl.End();

offset = 512.f;

// apply the third texture so it will draw on the third rect
texture[2]->apply(*state);
gl.Begin(GL_QUADS);
gl.TexCoord2f(0.f, 0.f);
gl.Vertex3f(offset + x, y, Z);
gl.TexCoord2f(0.f, 1.f);
gl.Vertex3f(offset + x + w, y, Z);
gl.TexCoord2f(1.f, 1.f);
gl.Vertex3f(offset + x + w, y + h, Z);
gl.TexCoord2f(1.f, 0.f);
gl.Vertex3f(offset + x, y + h, Z);
gl.End();
}
};

Can you see what I'm doing wrong? No textures show up at all when I  
try this code.


Thank you,
Aaron

Quoting tianzjyh :


Hi, Andersen,
Let's say you have three images, then you can wrap them using  
osg::Texture2D, something like this:

>

osg::Image* image0 = osgDB::readImageFile("filename0.xxx");
osg::Texture2D* tex0 = new osg::Texture2D(image0);
tex1->setWrap(..., ...);
tex1->setFilter(..., ...);




And then you can apply them in the drawImplementation() of your  
drawable like this :


osg::State& state = *renderInfo.getState();
state.setActiveTextureUnit(0);//set texture unit 0 as  
current texture
tex0->apply(state);//apply texture paras to  
current texture

...drawQuad0...

...deal with other two quads...




--

Cheers,
---
TianZJ



At 2016-12-29 07:32:01, "Aaron Andersen"  wrote:

Hello,

There is some code in a library which I want to adapt for OSG. The
code is pretty old and uses the old style OpenGL. I don't have the
time it would take to rewrite this code so I would like to use the
GLBeginEndAdapter to make this code work with OSG.

Looking at the GLBeginEndAdapter there isn't much documentation so I
was hoping someone could help me out. Please keep in mind my OpenGL
skills are lacking (which I why enjoy using a rendering engine like
OSG :-).

I've created a subclass to the Drawable class called "MyDrawable". In
the drawImplementation function I'm have a couple
gl.Begin(GL_QUADS)/gl.End() calls to draw 3 simple rectangles. I'm
unsure of how to apply 3 separate textures to these 3 rectangles. From
reading the ShapeDrawable class it looks like the state of the
Drawable applies the texture to everything you draw.

So how can I apply many different textures to my drawing, with 1
texture per shape I draw with GL_QUADS?

Thank you for any insight you can provide.
Aaron


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Texturing with GLBeginEndAdapter

2016-12-28 Thread Aaron Andersen

Hello,

There is some code in a library which I want to adapt for OSG. The  
code is pretty old and uses the old style OpenGL. I don't have the  
time it would take to rewrite this code so I would like to use the  
GLBeginEndAdapter to make this code work with OSG.


Looking at the GLBeginEndAdapter there isn't much documentation so I  
was hoping someone could help me out. Please keep in mind my OpenGL  
skills are lacking (which I why enjoy using a rendering engine like  
OSG :-).


I've created a subclass to the Drawable class called "MyDrawable". In  
the drawImplementation function I'm have a couple  
gl.Begin(GL_QUADS)/gl.End() calls to draw 3 simple rectangles. I'm  
unsure of how to apply 3 separate textures to these 3 rectangles. From  
reading the ShapeDrawable class it looks like the state of the  
Drawable applies the texture to everything you draw.


So how can I apply many different textures to my drawing, with 1  
texture per shape I draw with GL_QUADS?


Thank you for any insight you can provide.
Aaron


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Bitmap Font

2015-11-23 Thread Aaron Andersen

Hi Robert,

I went through that code and seems pretty straight forward.
Thank you for your help!

Aaron

Quoting Robert Osfield :


Hi Aaron,

On 22 November 2015 at 23:18, Aaron Andersen  wrote:


I haven't really been able to find a bitmap font in OSG. The closest I
could find was the DefaultFont in the osgText source code. I was hoping
there was an actual bitmap font class that I could use to create fonts from
an image. Anyone know of any?



There isn't a specific bit map font class as it isn't neccessary as you can
provide custom fonts by subclassing from osgText::FontImplementation, see
the OpenSceneGraph/src/osgPlugins/freetype/FreetTypeFont.h/.cpp and
src/osgQt/QFontImplementation.cpp.

Robert.




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Bitmap Font

2015-11-22 Thread Aaron Andersen

Hello,

I haven't really been able to find a bitmap font in OSG. The closest I 
could find was the DefaultFont in the osgText source code. I was hoping 
there was an actual bitmap font class that I could use to create fonts 
from an image. Anyone know of any?


Thanks,
Aaron
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] EventQueue::userEvent

2015-10-01 Thread Aaron Andersen
Robert,

I had assumed the time argument represented when the event should be processed, 
not representing the time of the event.

I understand now.

Thank you,
Aaron

On Oct 1, 2015 3:45 AM, Robert Osfield  wrote:
>
> Hi Aaron,
>
> On 1 October 2015 at 05:57, Aaron Andersen  wrote:
>>
>> I've tried to use the EventQueue::userEvent method which takes a "time" 
>> argument but no matter what value I put in for time the event always fires 
>> immediately. Is there any documentation on this?
>
>
> It's just a queue that gets queried each frame, if you don't want an event to 
> get handled then you shouldn't be putting it in the queue.
>
> Robert.
>  
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] EventQueue::userEvent

2015-09-30 Thread Aaron Andersen

Hello,

I've tried to use the EventQueue::userEvent method which takes a "time" 
argument but no matter what value I put in for time the event always 
fires immediately. Is there any documentation on this?


Thanks,
Aaron
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Reading files and callbacks

2015-08-31 Thread Aaron Andersen

Good to know. Thanks Robert!

Quoting Robert Osfield :


Hi Aaron,

On 31 August 2015 at 12:50, Aaron Andersen  wrote:


Might it make sense to add an optional callback to either the
PagedLOD+ProxyNode classes or to the DatabasePager for when loading of a
node is complete? If so, would patches be accepted?



As you have been able to do what you need with ReadFIleCallback then there
really isn't much need to do anything more.  Where possible I follow the
principle of "minimal and complete", so if there is already a satisfactory
solution there really isn't any need to add another solution.

Robert.




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Reading files and callbacks

2015-08-31 Thread Aaron Andersen

Hi Robert,

The solution you had presented me with a few weeks back has been  
working out great for me. I just thought that if this is an often  
requested feature then OSG might benefit from having the code built  
right in... I'm still very new to OSG, so was just wondering if that  
addition would be worth while or not.


Aaron

Quoting Robert Osfield :


HI Aaron,

On 31 August 2015 at 12:50, Aaron Andersen  wrote:


Might it make sense to add an optional callback to either the
PagedLOD+ProxyNode classes or to the DatabasePager for when loading of a
node is complete? If so, would patches be accepted?




The osgDB::ReadFileCallback allows you to report when a subgraph is loaded
by allowing you to call the standard osgDB::Registry::readFile(..) and then
process the subgraph, do any optional signally you want and return the
processed subgraph.

However, if you actually want to take charge of when the subgraph is
actually merged then there isn't presently a callback from it but you can
subclass from osgDB::DatabasePager and override the
DartabasePager::updateSceneGraph() method there merged loaded subgraphs
with the main scene graph.

Robert.




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Reading files and callbacks

2015-08-31 Thread Aaron Andersen

Hi Robert,

Might it make sense to add an optional callback to either the  
PagedLOD+ProxyNode classes or to the DatabasePager for when loading of  
a node is complete? If so, would patches be accepted?


Thank you,
Aaron

Quoting Robert Osfield :


Hi Tony,

On 31 August 2015 at 03:54, Tony Vasile  wrote:


We have a bunch of OpenFlight models with have information in some of the
nodes that we use to configure our system. Is it better to use ReadNodeFile
and post-process the file with a NodeVisitor? Or is is better to override
osgDB::ReadFileCallback and somehow exercise our code when it finds a node
of particular interest?



You'll likely be using the same code to find the nodes of interest no
matter what approach you use, to me it's really just an issue where it'll
be most convenient/flexible for you to invoke it in your application.

If you are loading the files directly by your application by calling
osgDB::readNodeFile(..) then adding post processing in afterwards would be
easy, but if the files are being read as part of paged database then using
the ReadFileCallback would be required.

Robert.




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] StateSet question

2015-08-31 Thread Aaron Andersen

I will look into this. Thank you both for your answers!

Quoting Sebastian Messerschmidt :

The more modern approach would be texture-arrays which might  
outperform texture atlas implementation in terms of implementation  
effort and memory bandwidth. It requires all textures to be of the  
same dimensions.
I'm successfully using this for texture variation on terrain and  
vegetation. Unfortunately you'll have to use the shader pipeline and  
write your own visitor to map the different textures to the  
instances of your geometry by adding an uniform to them or using an  
attribute (which might be a bit better performance-wise as there are  
no state-changes)


Cheers
Sebastian
--



Trajce Nikolov NICK @gmail.com>schrieb:


   Hi Aaron,

   I would do this with texture atlas - all roofs in one large texture
   and map them separately. This is sort of common in database development

   On Sat, Aug 29, 2015 at 11:14 PM, Aaron Andersenmailto:aa...@fosslib.net>> wrote:

   Hello,

   Consider if I have a mesh file constructed from 2 geometries: a
   cube, and a pyramid on top of the cube, representing a simple
   house. When I load this house it is pulled into OSG as a single
   Geode composed of 2 Geometry instances.

   I have 2 image files for this house: a brown brick house texture
   and a black shingle texture which can be applied to the 2
   geometries of the house mesh. Now consider if I have 2 more
   textures: a dark grey vinyl siding texture, and a dark green
   metal roof texture. If I keep producing more image files you can
   imagine all the different possibilities I might have in
   constructing a home.

   Now consider if I want to make a row of 25 houses:

   osg::Group * rootOfScene = new osg::Group;

   osg::Node * houseGeode = osgDB::readNodeFile("house-mesh.ext");

   for (int i = 0; i < 25; i++)
   {
osg::PositionAttitudeTransform * transform = new
   osg::PositionAttitudeTransform;

transform->setPosition(osg::Vec3d(i * 20.f, 0, 0));
transform->addChild(houseGeode);

rootOfScene->addChild(transform);
   }

   What is the most efficient way to apply these different texture
   sets so that I can have a row of houses, each with different
   textures being applied to the cube mesh and the pyramid mesh?

   Any help is greatly appreciated.

   Thank you,
   Aaron
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
   

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





   --
   trajce nikolov nick
   ___ osg-users mailing
   list

osg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] StateSet question

2015-08-29 Thread Aaron Andersen

Hello,

Consider if I have a mesh file constructed from 2 geometries: a cube, 
and a pyramid on top of the cube, representing a simple house. When I 
load this house it is pulled into OSG as a single Geode composed of 2 
Geometry instances.


I have 2 image files for this house: a brown brick house texture and a 
black shingle texture which can be applied to the 2 geometries of the 
house mesh. Now consider if I have 2 more textures: a dark grey vinyl 
siding texture, and a dark green metal roof texture. If I keep producing 
more image files you can imagine all the different possibilities I might 
have in constructing a home.


Now consider if I want to make a row of 25 houses:

osg::Group * rootOfScene = new osg::Group;

osg::Node * houseGeode = osgDB::readNodeFile("house-mesh.ext");

for (int i = 0; i < 25; i++)
{
osg::PositionAttitudeTransform * transform = new 
osg::PositionAttitudeTransform;


transform->setPosition(osg::Vec3d(i * 20.f, 0, 0));
transform->addChild(houseGeode);

rootOfScene->addChild(transform);
}

What is the most efficient way to apply these different texture sets so 
that I can have a row of houses, each with different textures being 
applied to the cube mesh and the pyramid mesh?


Any help is greatly appreciated.

Thank you,
Aaron
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Drawing the bounding sphere of a camera

2015-08-29 Thread Aaron Andersen

Hello,

I've attached a bounding sphere to the camera in my scene but the 
bounding sphere never moves, even when I move the camera. Can anyone 
explain to me what I'm doing wrong here?


code:

osg::ref_ptr cameraDebugSphere = new osg::Geode;
osg::ref_ptr drawable = new osg::ShapeDrawable;

drawable->setShape(new osg::Sphere(osg::Vec3(0, 0, 0), 60));
drawable->setColor(osg::Vec4(1.0f, 0.0f, 0.0f, 0.2f));

cameraDebugSphere->addDrawable(drawable.get());
viewer.getCamera()->addChild(cameraDebugSphere.get());

Shouldn't this draw a sphere that surrounds the camera?

Thank you for any input.
Aaron
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Monitoring the DatabasePager

2015-08-18 Thread Aaron Andersen

Hello,

Is there a way to have some sort of notification when the  
DatabasePager completes loading a node? I'd like to know when a  
ProxyNode or PagedLOD node has completed loading. Any callback I can  
register? I've browsed the DatabasePager code a bit and didn't notice  
anything obvious in the public API.


Thank you,
Aaron

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Advice on how to implement custom file format

2015-08-18 Thread Aaron Andersen

Hi Robert,

I've dug through the DatabasePager, PagedLOD, and ProxyNode code a bit  
and have a better understanding now. Thank you for the references to  
osgEarth. I'll check out that code and at least have good place to  
start now.


Thank you!
Aaron

Quoting Robert Osfield :


Hi Aaron,

The OSG has a DatabasePager built in, something you can leverage by
creating a paged database composed of PageLOD nodes, where the PagedLOD
nodes have file references to the tiles you want to load.

You can either use files directory or encode a tile via the filename string
and have the plugin that does the loading unpack the details of what to
load.

The VirtualPlanetBuilder tool creates native OSG paged databases from DEM's
and imagery, using the PagedLOD to create a paged quad tree hierarchy of
files and subgraph they map too.

The osgEarth NodeKit also uses PagedLOD but creates the tiles on the fly
reading the DEM and imagery on demand rather than re-processing like VPB
does.

Both VPB and osgEarth provide examples of PagedLOD usage, but with the two
approaches - loading pre-processed tiles directory or using a pseudo loader.

Robert.


On 16 August 2015 at 22:11, Aaron Andersen  wrote:


Hello,

I'm planning to render a custom (preexisting) map file format using osg
and was looking for some guidance. I haven't been using osg for that long
so I figure it is worth asking if there is either a way to adapt some
existing code in the library to fit this custom format, or if not, what
people might suggest as a good way to go about implementing loading and
rendering this map file format with osg.

The map is composed of individual 3d mesh tiles of variable size that are
"snapped" together side by side somewhat similar to toy Lego blocks. Most
mesh tiles are relatively small so there are a large number of these mesh
tiles required to draw the map. As for the file format itself, the map is
broken up spatially into many separate files (known as "regions").

I wish to write some code so that the map will be read into my application
and populate the scene graph seamlessly so there won't need to be a loading
screen every time the camera zooms to a new area of the map. The maps
stored in this format are *way* too large to load into memory all at once,
so I will need to stream data in as the camera approaches new areas and out
as it leaves other areas, always keeping the scene graph up to date.

I should mention that the map file format is a little peculiar in that
none of the 3d mesh tiles have any absolute position information listed at
all. Each and every mesh tile is placed relative to the an adjacent mesh
tile. I can arbitrarily choose any mesh tile from a map file and place it
at 0,0,0 and from there start placing adjacent tiles, and for each adjacent
tile place the adjacent tiles, recursively over and over, to build up the
map. I mention this placement peculiarity because it means that I can only
ever know the absolute position of any mesh tile that is relatively close
to the camera (ie. the area of the map I'm currently rendering).

If any clarification is required please let me know and thank you kindly
for any advice anyone can offer me.

Aaron Andersen

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Advice on how to implement custom file format

2015-08-16 Thread Aaron Andersen

Hello,

I'm planning to render a custom (preexisting) map file format using  
osg and was looking for some guidance. I haven't been using osg for  
that long so I figure it is worth asking if there is either a way to  
adapt some existing code in the library to fit this custom format, or  
if not, what people might suggest as a good way to go about  
implementing loading and rendering this map file format with osg.


The map is composed of individual 3d mesh tiles of variable size that  
are "snapped" together side by side somewhat similar to toy Lego  
blocks. Most mesh tiles are relatively small so there are a large  
number of these mesh tiles required to draw the map. As for the file  
format itself, the map is broken up spatially into many separate files  
(known as "regions").


I wish to write some code so that the map will be read into my  
application and populate the scene graph seamlessly so there won't  
need to be a loading screen every time the camera zooms to a new area  
of the map. The maps stored in this format are *way* too large to load  
into memory all at once, so I will need to stream data in as the  
camera approaches new areas and out as it leaves other areas, always  
keeping the scene graph up to date.


I should mention that the map file format is a little peculiar in that  
none of the 3d mesh tiles have any absolute position information  
listed at all. Each and every mesh tile is placed relative to the an  
adjacent mesh tile. I can arbitrarily choose any mesh tile from a map  
file and place it at 0,0,0 and from there start placing adjacent  
tiles, and for each adjacent tile place the adjacent tiles,  
recursively over and over, to build up the map. I mention this  
placement peculiarity because it means that I can only ever know the  
absolute position of any mesh tile that is relatively close to the  
camera (ie. the area of the map I'm currently rendering).


If any clarification is required please let me know and thank you  
kindly for any advice anyone can offer me.


Aaron Andersen

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Loading from directory, not file

2015-07-15 Thread Aaron Andersen
Hi Robert,

Thank you for your answer. That certainly cleared up how to make my loader work 
with a native file system directory. My code now works as expected!

I do have some questions about osg and virtual file systems, though. I noticed 
in the osg source code some files relating to zip and archive support which 
sounds great. Given the ReaderWriter interface has a read method which accepts 
an fstream it seems pretty straight forward that any ReaderWriter 
implementation implementing fstream methods will just work even if the file is 
in a zip file. That's fantastic, but it does leave me wondering what is the 
standard way for me to implement my ReaderWriter which requires the ability to 
look at a directory and read multiple files from that directory such that my 
ReaderWriter will "just work" even if the directory is virtual, like in a zip 
file?

Again, thank you kindly for any help you or anyone else may be able to provide.

Aaron

On July 15, 2015 3:26:26 AM EDT, Robert Osfield  
wrote:
>Hi Aaron,
>
>The ReaderWriter mechanism is built around the Chain-Of-Responsibility
>pattern so it's actually up to the ReaderWriter implementation to
>decide
>what files it can handle, you don't even need an file extension, or for
>the
>filename to even be an actual file or path name - this allows one to
>implement various psuedo loaders that various different things such as
>pre-processing of loaded models or paging.
>
>The only place that the extensions are stricktly checked is when
>initially
>loading the plugins - if no plugin that has already been loaded can
>handle
>a particle read*File() request then osgDB::Registry checks the
>extension
>and loads the plugin associated with that plugin.  In the case of
>psuedo
>plugin the filename won't be mapping directly to a file system file so
>the
>one either pre-loads these plugins, or append a .myplugin to filename
>and
>then strip the ".myplugin" inside the the ReaderWriter.  The .rot,
>.trans,
>.scale, .curl, .gdal plugins are all examples of plugins that use this
>approach.
>
>In your case I'd recommend supporting both these approproaches -
>support
>the dummy extension that maps to your plugin name as well as support
>usage
>without the extension.
>
>Robert.
>
>
>
>On 15 July 2015 at 00:01, Aaron Andersen  wrote:
>
>> I will preface this by saying I'm quite new to open scene graph, so
>if I'm
>> missing something obvious please forgive me.
>>
>> I have a node/scene format I would like to implement in open scene
>graph.
>> The data for the format is encapsulated in multiple files within a
>> directory, not within a single file.
>>
>> How can I make a reader writer for a directory as opposed to a file?
>The
>> ReaderWriter api is geared toward files (supportedExtension) and this
>is
>> leaving me a little confused.
>>
>> Any help or guidance would be greatly appreciated.
>>
>> Thank you,
>> Aaron
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>>
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
>
>
>___
>osg-users mailing list
>osg-users@lists.openscenegraph.org
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Loading from directory, not file

2015-07-14 Thread Aaron Andersen
I will preface this by saying I'm quite new to open scene graph, so if I'm 
missing something obvious please forgive me.

I have a node/scene format I would like to implement in open scene graph. The 
data for the format is encapsulated in multiple files within a directory, not 
within a single file.

How can I make a reader writer for a directory as opposed to a file? The 
ReaderWriter api is geared toward files (supportedExtension) and this is 
leaving me a little confused.

Any help or guidance would be greatly appreciated.

Thank you,
Aaron___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org