[osg-users] Strange error with multiple textures in a state set

2012-06-24 Thread Joel Graff
Hello, I've been playing with multi-texturing and have encountered a situation where I get a vector subscript out of range error. Typically, it's easy to spot the cause of this, but this one has me a bit stumped. I've boiled down the problem to what appears to be an issue with converting

Re: [osg-users] Update traversal executing too soon?

2012-06-07 Thread Joel Graff
Robert, Thanks for the clarification. I think you've identified exactly the problem: ...as the master's camera view matrix is copied from the CameraManipulator at the end of Viewer::update() after the visitor have run perhaps this is the cause. Thanks again. Joel -- Read this

Re: [osg-users] RTT using slave cameras (osgfpdeth example)

2012-06-06 Thread Joel Graff
Tim, That would appear to explain it. Thanks. -Joel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48074#48074 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] RTT using slave cameras (osgfpdeth example)

2012-06-02 Thread Joel Graff
Hello, I'm trying to learn the intracacies of rendering to textures using osg, and I've dissected the osgfpdepth example to do it. I've been largely successful at resolving the code into a much simpler example for rendering using the color buffer only. Anyway, my goal was to have both the

[osg-users] Render to texture with shaders

2012-05-24 Thread Joel Graff
Hi, I've run into a problem which I suspect is just a gap in my understanding of osg and RTT. Nevertheless, I'm a bit stumped. My goal is to do a small RTT test where I take a source texture, render it to a quad using an RTT camera and then apply the output to another quad. In other words,

Re: [osg-users] Problem using OSG GLSL uniforms and vertex attributes

2012-05-19 Thread Joel Graff
Just as a followup, I did discover why OSG was adding the MVP and Vertex declarations to the vertex file. I had previously started with version 120 code that included the line Code: gl_Position = ftransform(); In my effort to carefully transition from 120 to 140+, I only commented out

Re: [osg-users] Problem using OSG GLSL uniforms and vertex attributes

2012-04-02 Thread Joel Graff
Ok, here's what I did to solve it. First, I rebuilt my binaries and retested. Strangely, I had different results, though it may be that I didn't do something the first time that I did the second. I can't imagine rebuilding OSG would help, but it appears as though it did. Second, I retested

Re: [osg-users] Problem using OSG GLSL uniforms and vertex attributes

2012-03-30 Thread Joel Graff
Robert, Gave your suggestions a shot, but wasn't met with any real success. The error log seemed to indicate much the same errors regardless of the changes. I'll keep playing with it - perhaps dig into some code or try something else I've not thought of yet. I should note that the original

Re: [osg-users] Problem using OSG GLSL uniforms and vertex attributes

2012-03-30 Thread Joel Graff
I did bit more testing combining setUseModelViewAndProjectionUniforms() state changes with including / excluding the uniform declarations. It didn't really matter if I called setUseModelViewAndProjectionUniforms() with either true or false. In either case, the same errors were generated. The

[osg-users] Problem using OSG GLSL uniforms and vertex attributes

2012-03-29 Thread Joel Graff
Hello, I'm re-implementing some shader code and I've run into a problem I've not had before. That is, I'm switching on osg uniforms and vertex attributes for shaders (testing GLSL 140), as it's laid out in the osgVertexAttributes example, but it seems to only partly work. Here's the shader

Re: [osg-users] General multithreading question

2012-03-24 Thread Joel Graff
Robert, Thanks for the reply. I'm fairly certain the cause is buried somewhere else. I just wanted to make sure, given that OSG is a high-performance API (and multithreading isn't something I'm greatly experienced with), that there wasn't some optimization going on that could play into

[osg-users] General multithreading question

2012-03-23 Thread Joel Graff
Hi, Out of curiosity, is OSG's performance sensitive to accesses to threads spawned by it's process? What I mean is, my application runs with an extra thread that, functionally does nothing. At runtime, the application's update traversal time is stable at 0.09. But, if I access that thread

Re: [osg-users] Selectively deep copy a node....

2012-03-11 Thread Joel Graff
Robert, Thanks for the reply. That's pretty much what I'd suspected. Just wanted to check and see if there wasn't another approach that I couldn't see. Thanks. Joel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46151#46151

[osg-users] Selectively deep copy a node....

2012-03-10 Thread Joel Graff
So here's a bit of a mind-bender... I have a scene graph where I manage my assets (like loaded geometry) in a separate, non-rendered section of the graph (I've taken to calling it the asset library). Anyway, suppose in the rendered portion of my scene graph, I have several nodes, one of which

Re: [osg-users] Very odd behavior starting OSG app

2012-01-14 Thread Joel Graff
Robert, Thanks for the quick reply. After a little additional testing (knowing what you've told me), I'm starting to suspect I've got bigger problems than I thought. Am I right in assuming that serialization for user classes doesn't support multiple inheritance? The situation is thus: I

Re: [osg-users] Very odd behavior starting OSG app

2012-01-14 Thread Joel Graff
As it turns out, the problem I was experiencing lay elsewhere. Thanks again. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44840#44840 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Very odd behavior starting OSG app

2012-01-13 Thread Joel Graff
Hello, I recently noticed when my application starts, something triggers the REGISTER_OBJECT_WRAPPER macro for my custom uniform class and constructs a new object before main() is even called. I'm not much of a C++ guru, so at the moment, the only relevant info I know to provide is the call

[osg-users] Scene graph structure vs. performance question

2012-01-09 Thread Joel Graff
Hello, I've run into a little issue which could use some expert advice. I admit, I may be over-thinking it... Anyway, in my OSG application, I've chosen to represent an application-level node as several OSG nodes. At a minimum, an application node would consist of an osg::Switch followed by

Re: [osg-users] flagging shaders with errors

2011-10-22 Thread Joel Graff
Robert, It would appear I've not taken the time to really explain what I'm doing... My apologies. :) I am presently building a shader development environment using OSG. Since RenderMonkey can't really handle GLSL 140+ and the other options out there are limited so far as GLSL is concerned,

Re: [osg-users] flagging shaders with errors

2011-10-22 Thread Joel Graff
Terry, Actually, that looks like it'd work great! It's certainly a more direct route. (However, as a matter of principle, I'd still like to know what I'm missing in regards to what it takes to traverse a scene graph from a post draw or realize callback...) Thanks! Joel --

Re: [osg-users] flagging shaders with errors

2011-10-21 Thread Joel Graff
Robert, Actually, the idea is that if I import a shader file with errors, I want to delete it immediately, rather than leave it loaded. So, if a shader compiled with errors, (which I could determine by checking the error log in the post draw callback), I would have it flagged and an update

Re: [osg-users] flagging shaders with errors

2011-10-21 Thread Joel Graff
Unless you're implying I grab the console output and parse it for tell-tale signs of the shader error log to determine if the shader compiled with errors? Thank you! Cheers, Joel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43501#43501

[osg-users] flagging shaders with errors

2011-10-20 Thread Joel Graff
Hi, I have a postdraw callback attached to the viewer camera which looks for any shaders with error logs and flags them for removal. I have a separate callback that then iterates those flags and removes them accordingly. However, to make the shaders accessible to my postdraw callback, I had

Re: [osg-users] Passing node transformations to the vertex shader

2011-09-30 Thread Joel Graff
J-S, Thanks for the reply. I hadn't sat down and compared matrices yet, but I had debugged to ensure I was getting something. And yes, I'm accommodating for the fact that it's a ModelView (and not just a Model) matrix. I've also been using the osg_ attributes to this point, in lieu of the

Re: [osg-users] Passing node transformations to the vertex shader

2011-09-30 Thread Joel Graff
J-S, Of course. It's not that I didn't know state is inherited by child nodes, but for some reason, my testing of uniform inheritance failed, so I was manually propagating uniform pointers... Took 30 seconds to disable that code and prove your point. Thanks again. - Joel

[osg-users] Passing node transformations to the vertex shader

2011-09-29 Thread Joel Graff
Hi, I'm implementing shaders in GLSL 140+ (i.e. no built-in uniforms), and I've had reasonably good success thus far. However, it's quite obvious that passing the vertices in using osg_Vertex doesn't include any transformations which may have been inherited (or directly applied). This exact

Re: [osg-users] Passing node transformations to the vertex shader

2011-09-29 Thread Joel Graff
Hey, thanks for the fast response... What you're suggesting I actually tried. The View matrix was intact, but the transformations were not. So far as I can tell, my understanding matches what you're telling me, but just to be sure, I've assumed the following: 1. The CullVisitor function,

Re: [osg-users] RemoveChild() overwriting application memory

2011-09-23 Thread Joel Graff
Robert, This turns out to be more complicated than I anticipated. You were right - at least partly.. I think. I did some research on ref_ptr's (consulted OSG 3.0 Beginner's Guide and a few (conflicting) online tutorials) a few days ago. Fixed a few consistency issues, but didn't catch this

Re: [osg-users] RemoveChild() overwriting application memory

2011-09-23 Thread Joel Graff
Problem solved! I had buried the reference to my scene class in my console class (which acts as a callback for a node I was destroying)... Long way of saying whoops, I guess. Anyway, thanks for the help - I certainly learned a good bit nonetheless. Joel -- Read this topic

[osg-users] RemoveChild() overwriting application memory

2011-09-22 Thread Joel Graff
Hi, I'm running into a mysterious memory issue with the RemoveChild() function, and I'm not sure where the error exactly lies (whether it's with OSG or something I've done)... Anyway, the app I've written is driven by a console-level interface. It's broken into two core classes: Console and

Re: [osg-users] RemoveChild() overwriting application memory

2011-09-22 Thread Joel Graff
Thanks for the replies... My Scene class manages the scene graph almost entirely (sans custom nodevisitors and callbacks). It isn't derived from any osg classes and I can't really think of any reason why it should be... The class itself has no active role in the scene graph, it merely acts

[osg-users] setUseVertexAttributeAliasing() question

2011-09-12 Thread Joel Graff
Hi, I've been developing an app that I can use to develop GLSL 150+ code, and all has gone well to this point. Of course, since GLSL 140+ doesn't support built-ins, I've been using the method demonstrated in the osgvertexattributes.cpp example. The setUseModelViewAndProjectionUniforms()

Re: [osg-users] setUseVertexAttributeAliasing() question

2011-09-12 Thread Joel Graff
Hi, I appear to have answered my own question. After playing with the osgVertexAttributes example, it would seem that the visitor class wipes out the local array data after it has been converted to a vertex attribute, thus the setUseVertexAttributeAliasing() flag serves to point to the

[osg-users] Skipping nodes in serialization

2011-09-03 Thread Joel Graff
Hi, I have a graph that I serialize with a simple call to osgDB::writeNodeFile(), but it contains a node that is auto-generated when the application starts. Is there a way to exclude that node from serialization? I'm familiar with the setNodeMask() / setTraversalMask() mechanism used in

[osg-users] switching between camera manipulators

2011-04-05 Thread Joel Graff
Hi, I'm building a little 3D testing environment for shaders and OSG is doing fabulously well in accomplishing this task. However, I've run into a little problem that may require more advanced grasp of OSG theory than I currently possess. The app I'm developing uses the console as the input

Re: [osg-users] gelGlShaderInfoLog returning false

2011-01-12 Thread Joel Graff
Hi, Right. I had wondered if that may be the problem, but couldn't find anything to confirm it. Thanks for the tip! I also did try attaching a callback and checking it there. I received an unhandled exception error identical to what I received if I tried to access the log before

[osg-users] gelGlShaderInfoLog returning false

2011-01-08 Thread Joel Graff
-- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35437#35437 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] gelGlShaderInfoLog returning false

2011-01-08 Thread Joel Graff
Hmmm. Previous post is blank, but the text is there when I edit it... -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35438#35438 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] gelGlShaderInfoLog returning false

2011-01-08 Thread Joel Graff
-- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35439#35439 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] Using getGlShaderInfoLog

2010-12-15 Thread Joel Graff
J-S, Thanks for the reply. You told me exactly what I needed to know. I think I had assumed to this point that the shader would be compiled once it was loaded and bound to the program object - it seemed the most logical way to manage it. Of course, once you indicated that even compilation

Re: [osg-users] Using getGlShaderInfoLog

2010-12-14 Thread Joel Graff
Just as a follow-up, I stumbled across a post which indicated part of the problem may lie in the compiler. I should point out that I'm using OSG with VS2010. I'm also starting to wonder if this has something more to do with OpenGL than with OSG. I tried accessing the shader info log

[osg-users] Using getGlShaderInfoLog

2010-12-11 Thread Joel Graff
Hello, As I've been playing with shaders in OSG, I've tried to get the shader info log so I can export it directly to a file (largely because it doesn't want to show up in the console when I have a GLSL compilation error). In any case, I've pieced together several snippets of code across a few

Re: [osg-users] Using Geometry Shaders in OSG 2.9.9

2010-11-27 Thread Joel Graff
As a follow up, I did a little more research and discovered that I was adding some extra OSG code that wasn't needed (it appears to me that prior to version 1.5, extra code needed to be added to do what the GLSL layout feature does). I removed that and tried a simple pass-through shader and

Re: [osg-users] Using Geometry Shaders in OSG 2.9.9

2010-11-26 Thread Joel Graff
Would you believe as I clicked submit, I thought, gee, maybe I should have checked for typos...? Actually, I had changed the enumerator in a futile effort to make it work, then changed it back and must have mistyped. Anyway, as I suspected, correcting the error made no difference in the end

[osg-users] Using Geometry Shaders in OSG 2.9.9

2010-11-25 Thread Joel Graff
Hi, I've been developing an app in OpenSceneGraph to help me learn shaders. One component of that is to be able to visualize normals (surface, lighting, camera, etc.). I am attempting to implement geometry shaders to do this in GLSL 1.5 and OSG 2.9.9. At present, I've had success loading

Re: [osg-users] [build] 3rd party libs and VS 2010

2010-11-06 Thread Joel Graff
Just as a follow-up (esp. for others who aren't greatly familiar with cmake), I discovered that most of my problems getting the various plugins to show up in the generated VS project were solved by clicking the Advanced checkbox in the upper right of the cmake gui. This exposes a whole bunch

[osg-users] [build] 3rd party libs and VS 2010

2010-10-29 Thread Joel Graff
Hello, I'm build OSG 2.8.3 under VS2010. When setting it up, I specified the directories for Freetype in cmake. I had the two include path variables and the library debug variable pointing correctly (I think). However, when cmake generates, it doesn't generate the osgdb_freetype project. I

Re: [osg-users] [build] Compiling 2.8.3 under VS2010

2010-10-26 Thread Joel Graff
Oli, I couldn't agree more. For posterity's sake, I did have to go back and re-run cmake, which forced me to recompile everything anyway. I took the opportunity to try the /Za switch and it completely failed to compile. That, and the cmake process for VS2010 could use some refinement, too.

[osg-users] [build] Compiling 2.8.3 under VS2010

2010-10-25 Thread Joel Graff
Hi, I'm trying to compile OSG 2.8.3 source under VS2010 and have run into a couple problems. The first was resolved easily - it was the back_inserter problem requiring adding the iterator header to a couple files. The other issue, however, I have found no previous discussion regarding.

Re: [osg-users] [build] Compiling 2.8.3 under VS2010

2010-10-25 Thread Joel Graff
Oli, Thanks for the response. I took a look around in VS2010 and couldn't find an option to switch it off, so I added your suggestion as a command-line option, but to no avail. A little time on google turned up this rather unfortunate post: (I'd post the URL, but the forum rules won't let

Re: [osg-users] [build] Compiling 2.8.3 under VS2010

2010-10-25 Thread Joel Graff
Oli, That switch, from what I understand, is for 3rd party vendor extensions. It was actually addressed in the forum post I quoted... I admit, I didn't try /Za, I just assumed it wouldn't work, as the post's author seemed pretty knowledgeable. I say that because in the interim, I've just