Re: [osg-users] [osgPlugins] upgrades to osgdb_bsp

2010-12-22 Thread Thomas Dickerson
I was sidetracked for a while with exams and such, but I got back to work and I think I have all but one (or two) of the bugs worked out. Looking at the image below (and ignoring the wooden gates), the bottom half represents what the top half should look like, minus the lighting. The faces

Re: [osg-users] Several questions regarding Terrain

2010-12-22 Thread Thomas Dickerson
Hi, I have loaded a 256x256 HeightField, created a HeightFieldLayer, and added it as the ElevationLayer to a TerrainTile. Now, if I would like to go about texturing patches of terrain, do I essentially need a separate TerrainTile for each individual area to be textured? And if this is the

[osg-users] Several questions regarding Terrain

2010-12-20 Thread Thomas Dickerson
Hi, I would like to be able to load the terrain format used by the Torque Game Engine. A couple questions about how to use the Terrain mechanisms built in to OpenSceneGraph: If I have a heightfield which tiles cleanly, is there a mechanism to make a terrain repeat indefinitely?

Re: [osg-users] [osgPlugins] upgrades to osgdb_bsp

2010-10-27 Thread Thomas Dickerson
robertosfield wrote: If there are lots of changes then consider placing the changes into a separate plugin, but this does also assume that their is a different file extension for this file format, I don't know anything about the Dynamix Interior Format so can't comment on this. Whether you

Re: [osg-users] Translucent primitives grouped by Drawable or by Geode?

2010-10-27 Thread Thomas Dickerson
Robert, That is the response I was anticipating, but it's good to have my suspicions confirmed. Thanks, Thomas Vermont Sustainable Heating Initiative (http://www.sustainableheatingvt.org) || Village2Village Project (http://www.village2villageproject.org)

[osg-users] Translucent primitives grouped by Drawable or by Geode?

2010-10-26 Thread Thomas Dickerson
Hi, When rendering translucent objects in OpenSceneGraph, do I need a Drawable per set of translucent primitives, or a Geode per set? I'm asking because some of my models have a mixture of translucent and opaque materials, in terms of graph structure it seems like per-Geode would make more

[osg-users] [osgPlugins] upgrades to osgdb_bsp

2010-10-26 Thread Thomas Dickerson
Hey everyone, Over the last few weeks I've been working on upgrades to the ReaderWriterBSP class to allow it to load drawable geometry from files in the Dynamix Interior Format, a bsp format used by the Torque Game Engine, and it's derivatives. I have a few more bugs to track down with some

Re: [osg-users] [osgPlugins] bus error when reading PNG data from stream for new plugin

2010-10-13 Thread Thomas Dickerson
Skylark wrote: Ah yes, I should have thought before replying - on MacOS the Quicktime or ImageIO plugins will be preferred... Then Stephan's way should work for you. Sorry for wasting your time. Not at all, it's always pleasant when someone takes the time to respond, even if the

Re: [osg-users] [osgPlugins] bus error when reading PNG data from stream for new plugin

2010-10-12 Thread Thomas Dickerson
Skylark wrote: Hi Stephan, Thomas, To preload the png-plugin: osgDB::Registry::instance()-loadLibrary(png); // or osgdb_png, not sure right now. Or I find it easier to do: osgDB::Registry::instance()-loadPluginForExtension(png); J-S Unfortunately as far as I can tell,

Re: [osg-users] [osgPlugins] bus error when reading PNG data from stream for new plugin

2010-10-11 Thread Thomas Dickerson
I'm recompiling a debug build now and setting XCode up to debug a shared library, but I'm not sure what information would be helpful to you? Debugging is usually an interactive process, so without more specificity than use a debugger I can't do much more than take a screenshot, or upload a zip

Re: [osg-users] [osgPlugins] bus error when reading PNG data from stream for new plugin

2010-10-11 Thread Thomas Dickerson
Stepping through the code in XCode, I am crashing somewhere inside of ReaderWriterQT (specifically at GetGraphicsImporterForDataRef(dataRef, 'ptr ', gicomp); inside of QuicktimeImportExport::doImport), which would seem to confirm what you are saying. Is it possible that the QT code isn't

Re: [osg-users] [osgPlugins] bus error when reading PNG data from stream for new plugin

2010-10-11 Thread Thomas Dickerson
Sorry for the double post, but since I'm not sure how Mail2Forum handles edits to posts on the forum, I figured it would be better to avoid any confusion between the two communication channels. I've gotten osgdb_png.so to compile, how might I go about forcing its use (in place of osgdb_qt.so)

Re: [osg-users] [osgPlugins] bus error when reading PNG data from stream for new plugin

2010-10-11 Thread Thomas Dickerson
Ulrich Hertlein wrote: A stack trace is usually helpful, as it would tell you where (in what function) the crash occurred. To that effect, it does not need to be interactive. As Stephan already said, any additional information is helpful (your original mail didn't have a lot of

Re: [osg-users] [osgPlugins] bus error when reading PNG data from stream for new plugin

2010-10-11 Thread Thomas Dickerson
sth wrote: The quicktime plugin can handle input from streams but needs some assistance, as it can read a LOT of image-formats. It needs a mime-type / file-extension and a size of bytes to read from the stream. This makes sense, but is also semi-problematic, since I don't know how big the

[osg-users] [osgPlugins] bus error when reading PNG data from stream for new plugin

2010-10-10 Thread Thomas Dickerson
I'm working on extending the bsp plugin to support the .dif (Dynamix Interior Format) used by Torque Game Engine and its successors. I am attempting to read the png lightmaps from the file stream, using the following code: Code: osg::ref_ptrosgDB::ReaderWriter reader =

Re: [osg-users] pushing bytes back to ifstream?

2010-10-04 Thread Thomas Dickerson
Alberto Luaces wrote: Hi Thomas, since osgDB::ifstream inherits from std, you can try putback(char c) http://www.cplusplus.com/reference/iostream/istream/putback/ That sounds great, thanks. I was simply unsure if this was allowed, as the documentation makes no mention of inheritance.

[osg-users] pushing bytes back to ifstream?

2010-10-02 Thread Thomas Dickerson
I'm sorry if this is something that I should know, but osg::ifstream doesn't seem to have any way of peeking at the next byte or reading/pushing back a byte. I am attempting to implement a platform agnostic readLine() method that can handle \r\n, \r, or \n. Is there a wrapper class I should be

Re: [osg-users] [osgPlugins] Implementing ReaderWriter in a class within application binary

2010-09-20 Thread Thomas Dickerson
Tim Moore wrote: You don't need to do anything special for a ReaderWriter that you wish to link into your application. You write the class in exactly the same way, including the REGISTER_OSGPLUGIN macro. Your plugin will be registered early and OSG will use your code to load that file

Re: [osg-users] [osgPlugins] Implementing ReaderWriter in a class within application binary

2010-09-20 Thread Thomas Dickerson
That's good to know, I've registered for a wiki account and will do my best to post useful tips that I figure out. Most of the information I've seen on there up to this point seems to be related to developing around OSG rather than developing to extend it, which seems a little silly given how

Re: [osg-users] [osgPlugins] Implementing ReaderWriter in a class within application binary

2010-09-19 Thread Thomas Dickerson
Hi Robert, Thank you for the time you take to make your response, and the level of information you included in it. Unfortunately I think you may have misunderstood my original question. I was not inquiring about the possibility of serializing my own classes into the native binary format, but

[osg-users] [osgPlugins] Implementing ReaderWriter in a class within application binary

2010-09-18 Thread Thomas Dickerson
Hey everyone, Is it possible for osgDB to load classes implementing ReaderWriter functionality out of my application binary, or must they be stored in a separate .so in the plugin directory? If so, are there any special directions I need to follow to get this working? Secondly, what is proper