Re: [osg-users] FBO and Antialiasing

2008-02-15 Thread paul1492
What is the status of FBO Anti-Aliasing?  It doesn't look like it is in 2.3.4.

Any idea what I need to do to get FBO Anti-Aliasing. I'm currently using OSG 
1.2.

Paul

- Original Message 
From: Robert Osfield [EMAIL PROTECTED]
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Friday, January 25, 2008 4:47:48 AM
Subject: Re: [osg-users] FBO and Antialiasing

Hi Stephane,

The OSG's FBO implementation doesn't yet support anti-aliasing, but it
shouldn't be difficult extension to add support for.  I do have this
on my TODO list, just unfortunately quite within grasp as I've been so
swamped with other work.

Robert.

On Jan 24, 2008 9:49 PM, Stephane Lamoliatte
[EMAIL PROTECTED] wrote:
 Hi,

 I want to know if it is possible to render a scene to a frame buffer
 object with antialiasing (MSAA).
 If it is possible, how to do that with OpenSceneGraph ?

 --
 Stephane Lamoliatte
 ___
 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


  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] FBO and AntiAliasing

2008-05-19 Thread paul1492
From: Robert Osfield robert.osfield at gmail.com 
Date: Fri Jan 25 01:47:48 PST 2008 

Hi Stephane,
The OSG's FBO implementation doesn't yet support anti-aliasing, but it
shouldn't be difficult extension to add support for.  I do have this
on my TODO list, just unfortunately quite within grasp as I've been so
swamped with other work.
Robert.
Has this been implemented yet in the latest version of OSG?
Paul P.


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


[osg-users] OSG 2.5 and cmake

2008-05-21 Thread paul1492

Sorry if this has come up before...
I'm attempting to compile OSG 2.5 and when I do the ./configure, I get:
CMake Error: Error in cmake code at
/OSG_PATH/OSG_OP_OT-2.5/OpenSceneGraph-2.5.0/CMakeLists.txt:214:
INCLUDE Could not find include file: FindPkgConfig
Current CMake stack: 
/OSG_PATH/OSG_OP_OT-2.5/OpenSceneGraph-2.5.0/CMakeLists.txt;/OSG_PATH/cmake-2.4.6-Linux-i386/share/cmake-2.4/Modules/CMakeCInformation.cmake;/OSG_PATH/cmake-2.4.6-Linux-i386/share/cmake-2.4/Modules/CMakeCXXInformation.cmake;/OSG_PATH/OSG_OP_OT-2.5/OpenSceneGraph-2.5.0/FindPkgConfig
CMake Error: Error in cmake code at
/OSG_PATH/OSG_OP_OT-2.5/OpenSceneGraph-2.5.0/CMakeLists.txt:216:
Unknown CMake command PKG_CHECK_MODULES.
-- Configuring done
When I look in the cmake 2.4.6 directory, I don't see a file called 
FindPkgConfig... However, if I look in CMAKE 2.6, I see such a file...  The 
readme for OSG says it needs 2.4.6 or newer.. Did this requirement change. It 
seems that a change was made to CMakeLists.txt in early May which causes this 
include to now be used.
Paul


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


[osg-users] OSG 2.4 and Curl

2008-05-21 Thread paul1492
When I compile OSG 2.4, I'm getting compiler errors when it gets to the CURL 
plugin.. I have CURL 7.10.6 installed. I'm getting CURLINFO_HTTP_CONNECTCODE 
and CURLINFO_RESPONSE_CODE being undefined.  I see these defined in 7.12.1 of 
CURL but not in 7.10.6 (where I do my compiles). 
What is the proper way to disable compiling of the CURL plugin?
Paul P.


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


Re: [osg-users] OSG 2.4 and Curl

2008-05-22 Thread paul1492
RedHawk 2.3.2 has version 7.10.6 of curl (see attached) 
RedHawk 4.2.1 has version 7.12.1 of curl..
At first, I thought maybe you could just swap constant names but I'm not sure 
its that simple..
With all these curl versions out there, it would be nice if the curl plugin 
wasn't compliled if it didn't meet a minimum requirement.  
The way to disable right now involves going into ccmake . and the set
the include and lib paths for libcurl library to empty strings, then
configure the build system by pressing 'c' then 'g to generate the
makefiles.
I couldn't find these strings in the ccmake window (maybe I'm blind :-).
 
Paul
- Original Message 
From: Robert Osfield [EMAIL PROTECTED]
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Wednesday, May 21, 2008 3:05:55 PM
Subject: Re: [osg-users] OSG 2.4 and Curl

Hi Paul,

What OS do you have installed?

Could you send me the installed curl.h so I can review it against what
I'm compiling against.  FYI, I have libcurl 7.16.4 installed. Even
this is not the latest though, there is 7.18.1 available from the
libcurl website.

Robert.

On Wed, May 21, 2008 at 6:13 PM,  [EMAIL PROTECTED] wrote:
 When I compile OSG 2.4, I'm getting compiler errors when it gets to the CURL 
 plugin.. I have CURL 7.10.6 installed. I'm getting CURLINFO_HTTP_CONNECTCODE 
 and CURLINFO_RESPONSE_CODE being undefined.  I see these defined in 7.12.1 of 
 CURL but not in 7.10.6 (where I do my compiles).
 What is the proper way to disable compiling of the CURL plugin?
 Paul P.



 ___
 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



  #ifndef __CURL_CURL_H
#define __CURL_CURL_H
/***
 *  _   _   _ 
 *  Project ___| | | |  _ \| |
 * / __| | | | |_) | |
 *| (__| |_| |  _ | |___ 
 * \___|\___/|_| \_\_|
 *
 * Copyright (C) 1998 - 2003, Daniel Stenberg, [EMAIL PROTECTED], et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at http://curl.haxx.se/docs/copyright.html.
 * 
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 * $Id: curl.h,v 1.205 2003/07/22 08:23:16 bagder Exp $
 ***/

/* If you have problems, all libcurl docs and details are found here:
   http://curl.haxx.se/libcurl/
*/

/* This is the version number of the libcurl package from which this header
   file origins: */
#define LIBCURL_VERSION 7.10.6

/* This is the numeric version of the libcurl version number, meant for easier
   parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
   always follow this syntax:

 0xXXYYZZ

   Where XX, YY and ZZ are the main version, release and patch numbers in
   hexadecimal. All three numbers are always represented using two digits.  1.2
   would appear as 0x010200 while version 9.11.7 appears as 0x090b07.

   This 6-digit hexadecimal number does not show pre-release number, and it is
   always a greater number in a more recent release. It makes comparisons with
   greater than and less than work.
*/
#define LIBCURL_VERSION_NUM 0x070a06

#include stdio.h

/* The include stuff here below is mainly for time_t! */
#ifdef vms
# include types.h
# include time.h
#else
# include sys/types.h
# include time.h
#endif /* defined (vms) */

#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif

#include types.h

#ifdef  __cplusplus
extern C {
#endif

/* silly trick to preserve functionality with older code, but making it use
   our name space for the future */
#define HttpPost curl_httppost

struct curl_httppost {
  struct curl_httppost *next;   /* next entry in the list */
  char *name;   /* pointer to allocated name */
  long namelength;  /* length of name length */
  char *contents;   /* pointer to allocated data contents */
  long contentslength;  /* length of contents field */
  char *buffer; /* pointer to allocated buffer contents */
  long bufferlength;/* length of buffer field */
  char *contenttype;/* Content-Type */
  struct 

Re: [osg-users] DataVariance

2008-11-24 Thread paul1492
Using CullDrawThreadPerContext and it works.. 

If the problem is with stateset and Drawable not being set to DYNAMIC, why 
wouldn't my SetDataVariance NodeVisitor (see below) convert everything to 
DYNAMIC. I call this during my initialization of the scene graph.

Paul P.


- Original Message 
From: Robert Osfield [EMAIL PROTECTED]
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Monday, November 24, 2008 8:45:47 AM
Subject: Re: [osg-users] DataVariance

Hi Paul,

Could you try the CullDrawThreadPerContext thread model to see if that
works safely.  If it does then the issue is almost certainly down to
some StateSet or Drawable in your scene graph that you are modifying
the contents that don't have the DataVariance set to DYNAMIC.

Robert.

On Mon, Nov 24, 2008 at 1:41 PM,  [EMAIL PROTECTED] wrote:
 I attempted to set all my nodes and state sets to DYNAMIC data variance by 
 doing the following and it still is locking up on me (i.e. with the same call 
 stack as below):

    SetDataVariance dataVariance;
    root-accept(dataVariance);

 Where:

 class SetDataVariance : public osg::NodeVisitor
 {
 public:
    SetDataVariance():  
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN)
  {};
    virtual void apply(osg::Node node);
    virtual void apply(osg::Geode node);
 };
 void SetDataVariance::apply(osg::Node node)
 {
    node.getOrCreateStateSet()-setDataVariance(osg::Object::DYNAMIC);
    traverse(node);
 }
 void SetDataVariance::apply(osg::Geode geode)
 {
    geode.getOrCreateStateSet()-setDataVariance(osg::Object::DYNAMIC);
    geode.setDataVariance(osg::Object::DYNAMIC);
    for(unsigned int i=0;igeode.getNumDrawables();++i)
    {
        osg::Drawable* drawable = geode.getDrawable(i);
        if (drawable)
        {
            
drawable-getOrCreateStateSet()-setDataVariance(osg::Object::DYNAMIC);
            drawable-setDataVariance(osg::Object::DYNAMIC);
        }
    }
 }

 Removing a portion of my scene graph and the problem goes away (or is 
 hidden)..  In particular, if I remove the node-addDrawable(geometry), the 
 problem goes away. The problem exists even if node-addDrawable( new 
 osg::Geometry).  In addition, turning off optimization doesn't seem to help. 
 As I said before, using single threaded viewer and it works fine.

 Any idea what is going on?

 Paul P.

 - Original Message 
 From: Robert Osfield [EMAIL PROTECTED]
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Sent: Friday, November 21, 2008 4:10:20 AM
 Subject: Re: [osg-users] DataVariance

 Hi Paul P.

 You will have to debug this on your own I'm afraid, this type of issue
 is not something one can resolve without seeing it first hand.

 The best I can do is recommend that look into the using DataVariance
 set to DYNAMIC on all StateSet and Drawable that you have in your
 scene.  This is the most likely cause of problems like this, but we've
 already recommended this and you've made no comment whether you've
 tried this.  There have been lots written on this topic on osg-users
 so please don't overlook the archives.

 Robert.

 On Thu, Nov 20, 2008 at 7:32 PM,  [EMAIL PROTECTED] wrote:
 When I change to SingleThreaded, I do not see the problem. The standard OSG 
 examples work fine. Other cases of my problem also work fine.

 Clearly, it's something in this app that is causing problems.  In the 
 problem case, I'm rendering to two different image buffers and then reading 
 the images out on the CPU. My scene is a normal scene except I have two 
 cameras with each rendering to these different textures (i.e. a top and 
 bottom view of the scene). I also have another camera rendering an 
 orthogonal projection on top of the scene.

 Paul P.


 - Original Message 
 From: Robert Osfield [EMAIL PROTECTED]
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Sent: Wednesday, September 17, 2008 11:03:33 AM
 Subject: Re: [osg-users] DataVariance

 Hi Paul,

 I can't say why your app might be hanging.  Do the standard OSG
 example hang on your machine?

 Try running the view single threaded as something that might at least
 flesh out whether threading is an issue at all.

 Robert.

 On Wed, Sep 17, 2008 at 3:52 PM,  [EMAIL PROTECTED] wrote:
 Thanks for the quick response...

 Then, any idea why my application is hanging when I attempt to render my 
 first frame?? Below is the call stack of the two OSG threads.

 The problem seems to exist when I include two different parts of my scene 
 graph.  My scene graph consists of two Camera's at the root. Each renders 
 to a different image array (using camera-attach(..., image);).

 Each camera then has shared subgraphs attached which also contain a Camera 
 node (for Ortho view for part of the scene) but with no attachments.

 The osgViewer's camera is unchanged (and I really don't need to render 
 anything).

 Am I doing something wrong with these camera's?

 While I'm at it, one more questions:
 Is there  a way to turn on the 

[osg-users] osgShadow compile problem with OSG 2.7.8

2009-01-14 Thread paul1492
Can anybody tell me why I have this osgShadow compile problem using OSG 2.7.8 
when compiled using GCC 3.2.3? I think I had the same problem when I attempted 
to compile 2.7.7 as well..

Paul P.

[ 35%] Building CXX object 
src/osgShadow/CMakeFiles/osgShadow.dir/LightSpacePerspectiveShadowMap.o
In file included from 
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/include/osgShadow/LightSpacePerspectiveShadowMap:23,
 from 
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/src/osgShadow/LightSpacePerspectiveShadowMap.cpp:18:
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/include/osgShadow/ViewDependentShadowTechnique:
 In
   member function `virtual osgShadow::ViewDependentShadowTechnique::ViewData* 
   osgShadow::ProjectionShadowMapMinimalBoundsBaseClass, 
   ShadowProjectionAlgorithmClass::initViewDependentData(osgUtil::CullVisitor*,
   osgShadow::ViewDependentShadowTechnique::ViewData*)':
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/include/osgShadow/ViewDependentShadowTechnique:152:
 `
   struct osgShadow::ViewDependentShadowTechnique::ViewData' is protected
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/include/osgShadow/ProjectionShadowMap:77:
 within
   this context
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/include/osgShadow/ViewDependentShadowTechnique:152:
 `
   struct osgShadow::ViewDependentShadowTechnique::ViewData' is protected
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/include/osgShadow/ProjectionShadowMap:77:
 within
   this context
gmake[3]: *** 
[src/osgShadow/CMakeFiles/osgShadow.dir/LightSpacePerspectiveShadowMap.o] Error 
1
gmake[3]: Leaving directory 
`/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8'
gmake[2]: *** [src/osgShadow/CMakeFiles/osgShadow.dir/all] Error 2
gmake[2]: Leaving directory 
`/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory 
`/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8'
gmake: *** [opt] Error 2


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


[osg-users] osgstereomatch example shader warnings

2009-01-22 Thread paul1492
Is it me or can somebody explain why when I setenv OSG_NOTIFY_LEVEL debug and 
then run osgstereomatch example and I'm seeing the following all these warnings 
in the output (see below). It seems like things are running okay (maybe because 
these are only warnings :-). I'm running with OSG 2.6 with the OSG Data Set 
from OSG 2.6 but I don't think anything has changed in this area since then... 
I don't get any messages when I run without the notify level.

I'm not sure what the intended action is in each of these cases but there seems 
to be alot of warnings (in my opinion they should be errors).

Paul

glVersion=2.1, isGlslSupported=YES, glslLanguageVersion=1.2
Compiling FRAGMENT source:
/* -*- Mode: C -*- */
void main(void)
{
   gl_FragData[0] = vec4(100.0, 0.0, 0.0, 1.0);
   gl_FragData[1] = vec4(100.0, 0.0, 0.0, 1.0);
}
Linking osg::Program  id=2 contextID=0

Compiling FRAGMENT source:
/* -*- Mode: C -*- */
uniform sampler2DRect textureLeft;
uniform sampler2DRect textureRight;
uniform int start_disparity;
void main(void)
{
   vec2 texCoord = gl_TexCoord[0].xy;
   vec4 final;
   vec4 im0 = texture2DRect(textureLeft, texCoord);
   
   for (int t=0; t4; t++) {
   for (int c=0; c4; c++) {
    int disp_offset = (t*4)+c;
    vec4 im1 = texture2DRect(textureRight, texCoord + 
vec2(-(disp_offset+start_disparity),0));
    gl_FragData[t][c] = abs(im0 - im1);
   }
   }
}
FRAGMENT Shader  infolog:
(2) : warning C7531: global type sampler2DRect requires #extension 
GL_ARB_texture_rectangle : enable before use
(17) : warning C7011: implicit cast from vec4 to float
Linking osg::Program  id=4 contextID=0
Program  link succeded, infolog:
Fragment info
-
(2) : warning C7531: global type sampler2DRect requires #extension 
GL_ARB_texture_rectangle : enable before use
(17) : warning C7011: implicit cast from vec4 to float
 Uniform start_disparity loc=0 size=1 type=int
 Uniform textureLeft loc=1 size=1 type=UNDEFINED
 Uniform textureRight loc=2 size=1 type=UNDEFINED

Compiling FRAGMENT source:
/* -*- Mode: C -*- */
uniform sampler2DRect textureDiff0;
uniform sampler2DRect textureDiff1;
uniform sampler2DRect textureDiff2;
uniform sampler2DRect textureDiff3;
uniform sampler2DRect textureAggIn;
uniform int start_disparity;
uniform int window_size;
void main(void)
{
    int half_window_size = window_size/2;
    vec2 texCoord = gl_TexCoord[0].xy;
    sampler2DRect tdiff[4];
    tdiff[0] = textureDiff0;
    tdiff[1] = textureDiff1;
    tdiff[2] = textureDiff2;
    tdiff[3] = textureDiff3;
 
    float smallest_sum = 100;
    float sum;
    float disparity = 0;
    
    for (int t=0; t4; t++) { // four textures
 for (int c=0; c4; c++) { // four channels
 sum = 0.0;
 for (int y=-half_window_size; y=half_window_size; y++) {
  for (int x=-half_window_size; x=half_window_size; x++) {
  vec2 coord = texCoord + vec2(x,y);
  vec4 val = texture2DRect(tdiff[t], coord)[c];
  sum+=val;
  }
 }
 if (sum  smallest_sum) {
  smallest_sum = sum;
  disparity = start_disparity + ((t*4)+c);
 }
 }
    }
    float old_best_sum = texture2DRect(textureAggIn, texCoord)[0];
    float old_disparity = texture2DRect(textureAggIn, texCoord)[1];
    if (smallest_sum  old_best_sum) {
 gl_FragData[0][0] = smallest_sum;
 gl_FragData[0][1] = disparity;
    } else {
 gl_FragData[0][0] = old_best_sum;
 gl_FragData[0][1] = old_disparity;
    }
}
FRAGMENT Shader  infolog:
(2) : warning C7531: global type sampler2DRect requires #extension 
GL_ARB_texture_rectangle : enable before use
(21) : warning C7011: implicit cast from int to float
(23) : warning C7011: implicit cast from int to float
(31) : warning C7011: implicit cast from float to vec4
(32) : warning C7011: implicit cast from vec4 to float
(37) : warning C7011: implicit cast from int to float
Linking osg::Program  id=6 contextID=0
Program  link succeded, infolog:
Fragment info
-
(2) : warning C7531: global type sampler2DRect requires #extension 
GL_ARB_texture_rectangle : enable before use
(21) : warning C7011: implicit cast from int to float
(23) : warning C7011: implicit cast from int to float
(31) : warning C7011: implicit cast from float to vec4
(32) : warning C7011: implicit cast from vec4 to float
(37) : warning C7011: implicit cast from int to float
 Uniform start_disparity loc=0 size=1 type=int
 Uniform textureAggIn loc=1 size=1 type=UNDEFINED
 Uniform textureDiff0 loc=2 size=1 type=UNDEFINED
 Uniform textureDiff1 loc=3 size=1 type=UNDEFINED
 Uniform textureDiff2 loc=4 size=1 type=UNDEFINED
 Uniform textureDiff3 loc=5 size=1 type=UNDEFINED
 Uniform window_size loc=6 size=1 type=int

Compiling FRAGMENT source:
/* -*- Mode: C -*- */
uniform sampler2DRect textureLeft;
uniform sampler2DRect textureRight;
uniform int start_disparity;
void main(void)
{
   vec2 texCoord = gl_TexCoord[0].xy;
   vec4 final;
   vec4 im0 = texture2DRect(textureLeft, texCoord);
   
   for (int t=0; t4; t++) {
   for (int c=0; c4; c++) {
    int disp_offset = 

[osg-users] Multiple Render Target Question

2009-01-27 Thread paul1492
I'm attempt to develop a Multiple Render Target (MRT) program and have a few 
questions..

First, I see this in the osgstereomatch example:
Two textures are needed, because shaders cannot read and write to the same 
texture during calculation. One texture is used as input and the other as 
output. After a calculation, the input and output textures are swapped. The 
technique is known as ping-ponging or flip-flopping the textures. 

What does this mean?  Can I have the same texture defined as input (assigned to 
the StateSet) and still have it attached (but not used) as a render target? In 
short, I see how I can ping-pong the input by changing the texture uniform but 
how do I ping-pong the attached render buffer? Can I attach all my render 
targets but then not use them (if it's an input)?

What happens if you do read and write to the same texture each frame? Also, 
does this clear all my render targets (between frames):
    _Camera-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

What I'm trying to do is calculate a temporal averaging of a specific number of 
consecutive frames. I assume I need to keep a running average of frames as well 
as well as save each of the frames. Then each frame:
   SUM =  (SUM - oldestFrame + newFrame)
and 
   Output = SUM/numberOfFrames;

I think I'm done asking questions for now :-).

Thanks for any help you can provide...

Paul 


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


Re: [osg-users] osgShadow compile problem with OSG 2.7.8

2009-01-28 Thread paul1492
I don't know if this is the long term solution but I replaced the protected: on 
line 48 of ProjectionShadowMap and line 230 of ViewDependentShadowTechnique and 
the compiler errors seem to have gone away.

Paul



- Original Message 
From: Wojciech Lewandowski lewandow...@ai.com.pl
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Wednesday, January 14, 2009 11:33:51 AM
Subject: Re: [osg-users] osgShadow compile problem with OSG 2.7.8

Hi Paul,

 Can anybody tell me why I have this osgShadow compile problem using OSG 2.7.8 
 when compiled using GCC 3.2.3? I think I had the same problem when I 
 attempted to compile 2.7.7 as well..

I am not sure what is recommended solution for your case. Issue is probably 
related to usage of heavy templates with member subclasses. Sorry I work under 
windows and cannot test this using GCC compiler. Maybe other Linux Gurus can 
help. After looking at your error description I would bet that replacing few 
protected:  with public:  keywords should help. But I am not sure where 
exactly those replacements should be made. But for a start I would change it in 
line 48 of ProjectionShadowMap. If you manage to fix the problem please send 
you changes to osg-submissions.

Cheers,
Wojtek

[ 35%] Building CXX object 
src/osgShadow/CMakeFiles/osgShadow.dir/LightSpacePerspectiveShadowMap.o
In file included from 
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/include/osgShadow/LightSpacePerspectiveShadowMap:23,
from 
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/src/osgShadow/LightSpacePerspectiveShadowMap.cpp:18:
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/include/osgShadow/ViewDependentShadowTechnique:
 In
member function `virtual osgShadow::ViewDependentShadowTechnique::ViewData*
osgShadow::ProjectionShadowMapMinimalBoundsBaseClass,
ShadowProjectionAlgorithmClass::initViewDependentData(osgUtil::CullVisitor*,
osgShadow::ViewDependentShadowTechnique::ViewData*)':
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/include/osgShadow/ViewDependentShadowTechnique:152:
 `
struct osgShadow::ViewDependentShadowTechnique::ViewData' is protected
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/include/osgShadow/ProjectionShadowMap:77:
 within
this context
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/include/osgShadow/ViewDependentShadowTechnique:152:
 `
struct osgShadow::ViewDependentShadowTechnique::ViewData' is protected
/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8/include/osgShadow/ProjectionShadowMap:77:
 within
this context
gmake[3]: *** 
[src/osgShadow/CMakeFiles/osgShadow.dir/LightSpacePerspectiveShadowMap.o] Error 
1
gmake[3]: Leaving directory 
`/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8'
gmake[2]: *** [src/osgShadow/CMakeFiles/osgShadow.dir/all] Error 2
gmake[2]: Leaving directory 
`/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory 
`/net/jekyll/raid/data/EngNet/share/sammy/OSG_2_7_8/OpenSceneGraph-2.7.8'
gmake: *** [opt] Error 2



___
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


Re: [osg-users] Multiple Render Target Question

2009-01-29 Thread paul1492
Thanks for your help... 

One more question, I've been given approval to implement temporal averaging 
using the OpenGL accumulator buffer like what is done for osgmotionblur. 
However, that example adds an operation to each window of the viewer to do 
this. In my case, I have a two pass rendering approach and want to do the 
accumation average when rendering to the texture (i.e. the first pass) and 
not on the second pass output (i.e. so it can be used for the second pass). 
Therefore, I assume adding it as a window operation to the viewer would mean it 
would get done after all the rendering. Can I add this to the first pass camera?

Paul

- Original Message 
From: J.P. Delport jpdelp...@csir.co.za
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Tuesday, January 27, 2009 11:27:45 PM
Subject: Re: [osg-users] Multiple Render Target Question

Hi Paul,

paul1...@yahoo.com wrote:
 I'm attempt to develop a Multiple Render Target (MRT) program and
 have a few questions..
 
 First, I see this in the osgstereomatch example: Two textures are
 needed, because shaders cannot read and write to the same texture
 during calculation. One texture is used as input and the other as
 output. After a calculation, the input and output textures are
 swapped. The technique is known as ping-ponging or flip-flopping the
 textures.
 
 What does this mean?  Can I have the same texture defined as input
 (assigned to the StateSet) and still have it attached (but not used)
 as a render target? 

I'm not sure if it will work. If the current output depends on the previous 
output you need to fill a single of two targets (the current output) while 
reading from the other (the previous output). If the targets are attached to 
the same RTT camera I'm not sure how you can write to one but not write to the 
other one.

 In short, I see how I can ping-pong the input by
 changing the texture uniform but how do I ping-pong the attached
 render buffer? Can I attach all my render targets but then not use
 them (if it's an input)?

In all the code that I've made, I've ping-ponged the attached textures by 
swapping between two osg RTT cameras. The simplest example of this is 
osggameoflife.

There are other ways to swap, but they are not easy to do with base osg (I 
think, but am not sure, that osgPPU might help). For the options, have a look 
at this:

http://www.mathematik.uni-dortmund.de/~goeddeke/gpgpu/tutorial.html

search for ping pong.

The disadvantage of the two camera approach is that we are wasting FBOs. An 
easier way to change attachments would help.

 
 What happens if you do read and write to the same texture each frame?

Craziness. Try it. Think of multiple processes reading and writing to the same 
memory in parallel. If there is any dependency between in/out the data will get 
corrupted.

 Also, does this clear all my render targets (between frames): 
 _Camera-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

I think so, but write out the buffers to check.

 
 What I'm trying to do is calculate a temporal averaging of a specific
 number of consecutive frames. I assume I need to keep a running
 average of frames as well as well as save each of the frames. Then
 each frame: SUM =  (SUM - oldestFrame + newFrame) and Output =
 SUM/numberOfFrames;

You might be able to get away with just storing a running average. You can do 
something like:

time_constant = 10;
avg = ((time_constant-1)*avg + new_image)/time_constant;

This in effect creates a low-pass filter.

 
 I think I'm done asking questions for now :-).
 
 Thanks for any help you can provide...
 
 Paul

cheers
jp

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

-- This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. The full 
disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

___
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] VMAP Data

2009-03-05 Thread paul1492

Is there a way to read in VMAP (Vector Smart Map) data into OSG?  I'm 
interested in reading in Level 0 for now. 

Do I need GDAL, and/or VPB?

Thanks,
Paul P.


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


[osg-users] Anistropy Question

2008-07-02 Thread paul1492
How do I set the Anistropy for all textures which are read in (using an 
OpenFlight file) to a particular value?? 
I prefer to do this without using a NodeVisitor and I do not want to effect 
textures I manual create and attach to the Scene Graph.
In addition, for a TerraPage file, I assume I can set the Anistropy using the:
    osgDB::DatabasePager *dp = osgDB::Registry::instance()-getDatabasePager();
   dp-setMaxAnistropyPolicy(true,value);
Correct?
Paul P.


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


[osg-users] NPOT Textures

2008-07-07 Thread paul1492
If my hardware supports NPOT textures, how do I turn off resizeNonPowerOfTwo 
when loading an OpenFlight file?
I don't see an easy way to do this..
Paul P.


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


[osg-users] Centroid Varying Shader Variable

2008-07-07 Thread paul1492
I'm attempting to define a centroid varying variable:
http://www.opengl.org/pipeline/article/vol003_6/
Why do I need the #version 120 line?
I send my shader programs through the C-Preprocessor (cpp) before giving them 
to OSG and CPP doesn't like this line (clearly it thinks its a command it 
should understand)..  
I assume this line is defining the Shader Version to use (1.2). If I don't have 
this line, the shader compiler doesn't like the centroid word.
Setting OSG_NOTIFY_LEVEL seems to report that glslLanguageVersion=1.2 even when 
I don't use #version.
Is there some other way to tell the shader compiler/OSG that that the shader is 
a 1.2 shader? 
While I'm at it, does the shader compiler natively support any CPP directives 
(i.e. # commands).?
Paul P.


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


Re: [osg-users] Centroid Varying Shader Variable

2008-07-07 Thread paul1492
Never mind I guess I found my answers here:
http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf

Paul P.

- Original Message 
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: osg-users@lists.openscenegraph.org
Sent: Monday, July 7, 2008 3:19:12 PM
Subject: [osg-users] Centroid Varying Shader Variable

I'm attempting to define a centroid varying variable:
http://www.opengl.org/pipeline/article/vol003_6/
Why do I need the #version 120 line?
I send my shader programs through the C-Preprocessor (cpp) before giving them 
to OSG and CPP doesn't like this line (clearly it thinks its a command it 
should understand)..  
I assume this line is defining the Shader Version to use (1.2). If I don't have 
this line, the shader compiler doesn't like the centroid word.
Setting OSG_NOTIFY_LEVEL seems to report that glslLanguageVersion=1.2 even when 
I don't use #version.
Is there some other way to tell the shader compiler/OSG that that the shader is 
a 1.2 shader? 
While I'm at it, does the shader compiler natively support any CPP directives 
(i.e. # commands).?
Paul P.


      
___
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


Re: [osg-users] Centroid Varying Shader Variable

2008-07-07 Thread paul1492
From Page 8 of the document:=
The directive “
Version 1.10 of the language does not require shaders to include this 
directive, and shaders that#version directive will be treated as targeting 
version 1.10. The behavior of shaders
do not include a 
targeting version 1.10 will not be effected by any changes introduced in 
version 1.20.
=
You would have thought that a 1.2 compiler would be able to compile all earlier 
version of the language but they decided to implement it such you must tell the 
compile your using 1.2 of the language. 
Also, about the CPP part of my question, I see the shader language supports 
many of these directives.. Is there any way to externally (i.e. in OSG) to set 
a #define variable?? For example, With the CPP, I use cpp -DVariable=10 
infile.txt outfile.txt. And then I'd do a:
    fragProgram-loadShaderSourceFromFile(outfile.txt);
Do I have to create a #define Variable 10 string and prepend it to my shader 
code (which isn't easy if I use loadShaderSourceFromFile()). Is there some 
other way? Anybody use the shader's conditional compile directives?
Paul P.



- Original Message 
From: Gordon Tomlinson [EMAIL PROTECTED]
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Monday, July 7, 2008 5:34:18 PM
Subject: Re: [osg-users] Centroid Varying Shader Variable

And the answer was ?



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, July 07, 2008 5:31 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Centroid Varying Shader Variable

Never mind I guess I found my answers here:
http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf

Paul P.

- Original Message 
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: osg-users@lists.openscenegraph.org
Sent: Monday, July 7, 2008 3:19:12 PM
Subject: [osg-users] Centroid Varying Shader Variable

I'm attempting to define a centroid varying variable:
http://www.opengl.org/pipeline/article/vol003_6/
Why do I need the #version 120 line?
I send my shader programs through the C-Preprocessor (cpp) before giving
them to OSG and CPP doesn't like this line (clearly it thinks its a command
it should understand).. I assume this line is defining the Shader Version to
use (1.2). If I don't have this line, the shader compiler doesn't like the
centroid word.
Setting OSG_NOTIFY_LEVEL seems to report that glslLanguageVersion=1.2 even
when I don't use #version.
Is there some other way to tell the shader compiler/OSG that that the shader
is a 1.2 shader? While I'm at it, does the shader compiler natively support
any CPP directives (i.e. # commands).?
Paul P.


      
___
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
#version 120” is required in any shader that uses version 1.20 of the language. 
... 


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


[osg-users] Render to Texture

2008-07-15 Thread paul1492
I'm attempting to render to a texture and then dump the rendered texture to a 
file (every frame), but I'm having trouble.
I've attempted to use the osgprerender example (using the --image option), and 
replaced the MyCameraPostDrawCallback::operator() to have a
    osgDB::writeImageFile(*_image, fileName);
where fileName is a .tif file (or .jpg file).
When I look at the .tif file using the Linux display program, I get some 
funny banded image. What am I doing wrong?
Is there a more efficient way to get access to the rendered image? Must I 
allocate an image array to the texture to access the image?
Paul P.


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


Re: [osg-users] Render to Texture

2008-07-21 Thread paul1492
On a similar subject, I'm looking at osgprerendering --image cow.osg example 
in OSG 2.5.3. My application only requires capturing the rendered (1st pass) 
(texture/image) and using it on the CPU rather than rendering it again. 
Therefore, I'm attempting to modify the osgprerender example to not do the 
second pass rendering, however, when I delete the polyGeom-setVertexArray 
reference and/or the polyGeom-addPrimitiveSet() calls, my cow becomes black in 
the image/texture but the rest of the texture has color.
Any idea what is going on?  Is there a better way to capture the texture/image 
without the need to render it?
Paul P.



- Original Message 
From: Gordon Tomlinson [EMAIL PROTECTED]
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Monday, July 21, 2008 7:13:58 AM
Subject: Re: [osg-users] Render to Texture

HI

WRT your OGL read, I suspect you are doing this in a process with NO OGL
context, 
OSG 2.x is multi-threaded by default unlike 1.x, so you can only do OGL
calls in the Draw process with say a draw callback
( see examples and mailing list archive on the subject)

Also See the examples in 2.4/5 for render to textures



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Roberts,
Gareth
Sent: Monday, July 21, 2008 5:42 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Render to Texture

I used this code...

  const int TEX_WIDTH = 512;
  const int TEX_HEIGHT = 512;
  osg::ref_ptrosg::Texture2D texture (new osg::Texture2D());
  texture-setTextureSize (TEX_WIDTH, TEX_HEIGHT);
  osg::Image* image = new osg::Image;
  image-allocateImage(TEX_WIDTH, TEX_HEIGHT, 1, GL_RGBA,
GL_UNSIGNED_BYTE);
  texture-setImage(0, image);
  osg::ref_ptrosg::Image zim = texture-getImage();
  unsigned char* imptr = zim-data();

With OSG 1.0 and was able to readback the image via the pointer imptr.
The same code fails with OSG 2.0 and 2.4

I have also used an openGL read with osg 1.0, this also fails with osg 2.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 16 July 2008 14:48
To: OpenSceneGraph Users
Subject: Re: [osg-users] Render to Texture

              *** WARNING ***

This mail has originated outside your organization, either from an external
partner or the Global Internet. 
    Keep this in mind if you answer this message. 

I'm not sure what is going on but I switched to dumping a png file and
still see the banding (see attached)...
Are you sure the PNG plugin can handle dumping an RGBA GL_FLOAT image?
All I did was add a osgDB::writeImageFile(*_image,
somefilename.png) at the end of the GL_FLOAT/RGBA if statement in
 MyCameraPostDrawCallback::operator() in the osgprerender.cpp example and
then ran this example using --image cow.osg.

Paul P.


- Original Message 
From: J.P. Delport [EMAIL PROTECTED]
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Tuesday, July 15, 2008 8:11:14 AM
Subject: Re: [osg-users] Render to Texture

Hi,

make sure the image writer can handle your image format. Bands usually mean
an alignment error in the data the writer expects. E.g. expects binary input
data to be RGB, but the data is RGBA.

.jpg does not support alpha I think.

Try .png

jp

[EMAIL PROTECTED] wrote:
 I'm attempting to render to a texture and then dump the rendered 
 texture
to a file (every frame), but I'm having trouble.
 I've attempted to use the osgprerender example (using the --image 
option), and replaced the MyCameraPostDrawCallback::operator() to have 
a
    osgDB::writeImageFile(*_image, fileName);  where fileName is a 
.tif file (or .jpg file).
 When I look at the .tif file using the Linux display program, I get 
some
funny banded image. What am I doing wrong?
 Is there a more efficient way to get access to the rendered image? 
 Must I
allocate an image array to the texture to access the image?
 Paul P.
 
 
      
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.
 org

--
This message is subject to the CSIR's copyright terms and conditions, e-mail
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.  MailScanner thanks Transtec
Computers for their support.

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





This email and any attachments are confidential to the intended recipient
and may also be privileged. If you are not the intended recipient please
delete it from your system and notify the sender. You should not copy it or
use it for any purpose 

[osg-users] RTT RenderBuffers

2008-08-18 Thread paul1492
When rendering to a texture, what determines the RenderBuffer (internal) 
format?  I would have thought it should use the texture's internal format to 
define the RenderBuffer format, but I don't see this in the code. However, I do 
see this in FrameBufferAttachment::FrameBufferAttachment(Camera::Attachment 
attachment) when given an image pointer attachment:
    osg::Image* image = attachment._image.get();
    if (image)
    {
    if (image-s()0  image-t()0)
    {
    GLenum format = attachment._image-getInternalTextureFormat();
    if (format == 0)
    format = attachment._internalFormat;
    _ximpl = new Pimpl(Pimpl::RENDERBUFFER);
    _ximpl-renderbufferTarget = new osg::RenderBuffer(image-s(), 
image-t(), format);
    }
    else
    {
    osg::notify(osg::WARN)Error: 
FrameBufferAttachment::FrameBufferAttachment(Camera::Attachment) passed an 
empty osg::Image, image must be allocated first.std::endl;
    }
    return;
    }
Do I have to set the internal format manually by calling the Camera-attach 
twice:
   camera-attach(osg::Camera::COLOR_BUFFER, texture, 0, 0, false, samples, 
colorSamples);
   camera-attach(osg::Camera::COLOR_BUFFER, GL_LUMINANCE32F_ARB);
I don't see in the code where the camera ::Attachment._internalFormat is being 
initialized when given a texture.
Am I missing something? Is there a better example of this than the 
osgprerender.cpp example?
Paul P.


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


[osg-users] osgmultiplerendertargets

2008-09-04 Thread paul1492
I'm getting a segmentation fault when running the osgmultiplerendertargets 
example using OSG 2.6 under Linux.The call stack says its in 
RenderStage::runCameraSetUp. My OSG isn't currently compiled debug. Am I doing 
something wrong? Do I need command line arguments?

Paul P


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


[osg-users] DataVariance

2008-09-17 Thread paul1492
In OSG 2.6, is the DataVariance value only used by the Optimizer or is it also 
used during the frame processing? 

I've had some problems in the past with the StaticObjectDetectionVisitor and 
the Optimizer (assume sharing part of the Optimizer) doing some things to my 
scene graph which cause it to render incorrectly when I don't specify my 
DataVariance as being DYNAMIC. 

Is there a reason why there is a StaticObjectDetectionVisitor being done when 
setSceneData() is performed independent of the Optimizer settings? Is the 
DataVariance value used by something other than the Optimizer?

Paul P.



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


Re: [osg-users] DataVariance

2008-09-17 Thread paul1492
Thanks for the quick response...   
 
Then, any idea why my application is hanging when I attempt to render my first 
frame?? Below is the call stack of the two OSG threads.
 
The problem seems to exist when I include two different parts of my scene 
graph.  My scene graph consists of two Camera's at the root. Each renders to a 
different image array (using camera-attach(..., image);).
 
Each camera then has shared subgraphs attached which also contain a Camera node 
(for Ortho view for part of the scene) but with no attachments.  
 
The osgViewer's camera is unchanged (and I really don't need to render 
anything). 
 
Am I doing something wrong with these camera's?
 
While I'm at it, one more questions:
Is there  a way to turn on the OSG statistics overlay without using the 
keyboard. I've added the StatsHandler event handler. With osgProducer, I used 
to be able to do viewerEventHandler-setFrameStatsMode(mode).
 
Paul P.
 
THREAD #1
#0  0x4146627d in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/libpthread.so.0
#1  0x41235a66 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libc.so.6
#2  0x40b1e364 in OpenThreads::Condition::wait (this=0x8281f88,
    mutex=0x8281f80)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThreadCondition.c++:137
#3  0x40ad9241 in OpenThreads::BlockCount::block (this=0x8281f80) at Block:133
#4  0x40ad7506 in osgViewer::ViewerBase::renderingTraversals (this=0x827ab58)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/ViewerBase.cpp:733
#5  0x40ad6a88 in osgViewer::ViewerBase::frame (this=0x827ab58,
    simulationTime=0)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/ViewerBase.cpp:592
#6  0x080858a7 in MyViewer::frame (this=0x827aad8, simTime=0)
    at MyViewer.hpp:131
 
THREAD #2
#0  0x4146627d in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/libpthread.so.0
#1  0x41235a66 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libc.so.6
#2  0x40b1e364 in OpenThreads::Condition::wait (this=0x82786dc,
    mutex=0x82786d4)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThreadCondition.c++:137
#3  0x400aedf5 in OpenThreads::Block::block (this=0x82786d4) at Block:42
#4  0x40a8cdc7 in osgViewer::Renderer::TheadSafeQueue::takeFront (
    this=0x82786cc)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/Renderer.cpp:136
#5  0x40a8ee38 in osgViewer::Renderer::draw (this=0x8278640)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/Renderer.cpp:340
#6  0x40a9085e in osgViewer::Renderer::operator() (this=0x8278640,
    context=0x8272258)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/Renderer.cpp:640
#7  0x4086352d in osg::GraphicsContext::runOperations (this=0x8272258)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsContext.cpp:688
#8  0x4086c3ee in osg::RunOperations::operator() (this=0x829ea70,
-    context=0x8272258)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsThread.cpp:134
#9  0x4086bc7d in osg::GraphicsOperation::operator() (this=0x829ea70, 
object=Internal: global symbol `Object' found in RissAnimationPath.cpp psymtab 
but not in symtab.
Object may be an inlined function, or may be a template function
(if a template, try specifying an instantiation: Objecttype).
)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsThread.cpp:50
#10 0x408af928 in osg::OperationThread::run (this=0x829e810)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/OperationThread.cpp:413
#11 0x4086bbf9 in osg::GraphicsThread::run (this=0x829e810)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsThread.cpp:38
#12 0x40b1d672 in OpenThreads::ThreadPrivateActions::StartThread (
    data=0x829e820)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThread.c++:170
#13 0x41463dec in start_thread () from /lib/tls/libpthread.so.0
#14 0x41228a2a in clone () from /lib/tls/libc.so.6




- Original Message 
From: Robert Osfield [EMAIL PROTECTED]
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Wednesday, September 17, 2008 8:06:47 AM
Subject: Re: [osg-users] DataVariance

Hi Paul,

In all the OSG 2.x series the DataVariance is used during the draw
traversal to monitor when all DYNAMIC StateSet and Drawables have been
dispatched, as once they have been the next frame can be started in a
parallel with the remaining STATIC objects are rendered (in
DrawThreadPerContex, CullThreadPerCameraDrawThreadPerContext threading
models.)

Robert.

On Wed, Sep 17, 2008 at 12:54 PM,  [EMAIL PROTECTED] wrote:
 In OSG 2.6, is the DataVariance value only used by the Optimizer or is it 
 also used during the frame processing?

 I've had some problems in the past with the StaticObjectDetectionVisitor and 
 the Optimizer (assume sharing part of the Optimizer) doing some things to 
 my scene graph which cause it to render incorrectly when I 

[osg-users] useCursor

2008-09-29 Thread paul1492
I'm attempting to turn off the cursor using 
    osgViewer::Viewer::Windows windows;
   _viewer-getWindows(windows);
   for (osgViewer::Viewer::Windows::iterator itr = windows.begin(); 
    itr != 
windows.end();
   ++itr)
    (*itr)-useCursor(false);

and I seem to be getting this:

Got an X11ErrorHandling call disGpot laany =X11Err0oxr8H270a9n2d8lin g 
ceavlentl=0 dxispbl7a1y3=00200x8270
928 event=0xbfffcc60
Xlib: sequence lost (0x10034  0x35) in reply type 0x0!
Xlib: charsets ISO8859-1:GL and ISO8859-1:GL have the same CT sequence
Xlib: charsets ISO8859-10:GR and ISO8859-10:GR have the same CT sequence
Xlib: charsets ISO8859-15:GR and ISO8859-15:GR have the same CT sequence
Xlib: charsets GB2312.1980-0:GL and GB2312.1980-0:GL have the same CT sequence
Xlib: charsets JISX0212.1990-0:GL and JISX0212.1990-0:GL have the same CT 
sequence
Xlib: charsets KSC5601.1987-0:GR and KSC5601.1987-0:GR have the same CT sequence
Xlib: charsets CNS11643.1986-2:GL and CNS11643.1986-2:GL have the same CT 
sequence
Xlib: charsets CNS11643.1992-3:GR and CNS11643.1992-3:GR have the same CT 
sequence
Xlib: charsets CNS11643.1992-5:GL and CNS11643.1992-5:GL have the same CT 
sequence
Xlib: charsets CNS11643.1992-7:GL and CNS11643.1992-7:GL have the same CT 
sequence
Xlib: charsets BIG5-0:GLGR and BIG5-0:GLGR have the same CT sequence
Xlib: charsets BIG5-E1:GL and BIG5-E1:GL have the same CT sequence
Segmentation fault

I don't seem to have any problems with osgcatch which seems to do the same 
thing, but I am newing an osgViewer.  Any ideas what might be causing this?  
I'm using OSG 2.6.  I do play with processor affinity/shielding, but turning 
this off doesn't seem to help.

Paul P.



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


Re: [osg-users] useCursor

2008-09-30 Thread paul1492
Is this a race condition??? Sometimes I get this X11ErrorHandling problem and 
other times I don't.  

Just before turning off the cursor, I have a _viewer-realize(); I assume this 
is where the graphics context is created.  If I put a sleep between the realize 
and the useCursor loop, it seems to work more reliably.  Can somebody describe 
to me how the realize relates to the useCursor command so I can better 
understand what is going on here.  I assume it's not a problem turning off the 
cursor on a mouse-less machine.

Paul P.

- Original Message 
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: osg-users@lists.openscenegraph.org
Sent: Monday, September 29, 2008 8:15:35 AM
Subject: useCursor

I'm attempting to turn off the cursor using 
    osgViewer::Viewer::Windows windows;
   _viewer-getWindows(windows);
   for (osgViewer::Viewer::Windows::iterator itr = windows.begin(); 
    itr != 
windows.end();
   ++itr)
    (*itr)-useCursor(false);

and I seem to be getting this:

Got an X11ErrorHandling call disGpot laany =X11Err0oxr8H270a9n2d8lin g 
ceavlentl=0 dxispbl7a1y3=00200x8270
928 event=0xbfffcc60
Xlib: sequence lost (0x10034  0x35) in reply type 0x0!
Xlib: charsets ISO8859-1:GL and ISO8859-1:GL have the same CT sequence
Xlib: charsets ISO8859-10:GR and ISO8859-10:GR have the same CT sequence
Xlib: charsets ISO8859-15:GR and ISO8859-15:GR have the same CT sequence
Xlib: charsets GB2312.1980-0:GL and GB2312.1980-0:GL have the same CT sequence
Xlib: charsets JISX0212.1990-0:GL and JISX0212.1990-0:GL have the same CT 
sequence
Xlib: charsets KSC5601.1987-0:GR and KSC5601.1987-0:GR have the same CT sequence
Xlib: charsets CNS11643.1986-2:GL and CNS11643.1986-2:GL have the same CT 
sequence
Xlib: charsets CNS11643.1992-3:GR and CNS11643.1992-3:GR have the same CT 
sequence
Xlib: charsets CNS11643.1992-5:GL and CNS11643.1992-5:GL have the same CT 
sequence
Xlib: charsets CNS11643.1992-7:GL and CNS11643.1992-7:GL have the same CT 
sequence
Xlib: charsets BIG5-0:GLGR and BIG5-0:GLGR have the same CT sequence
Xlib: charsets BIG5-E1:GL and BIG5-E1:GL have the same CT sequence
Segmentation fault

I don't seem to have any problems with osgcatch which seems to do the same 
thing, but I am newing an osgViewer.  Any ideas what might be causing this?  
I'm using OSG 2.6.  I do play with processor affinity/shielding, but turning 
this off doesn't seem to help.

Paul P.


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


Re: [osg-users] Using OSG with Borland C++ Builder 2007

2008-10-08 Thread paul1492
I've always been a big fan of Borland compiler (until recently when the price 
went though the roof :-).

Borland probably doesn't like the protected definition of 
_databasePagerThreadPaused along with the nesting structure of ReadQueue 
class... The error message is a little criptic.

Try changing the pager-_databasePagerThreadPaused reference around line 384 to 
pager-getDatabasePagerThreadPause() and see if that helps.

Just my two cents,
Paul P.

- Original Message 
From: Geoff [EMAIL PROTECTED]
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Wednesday, October 8, 2008 8:46:52 AM
Subject: Re: [osg-users] Using OSG with Borland C++ Builder 2007

Right now I am using XP Pro, OSG 2.6.0, CMake 2.6 path 2. The error I
was getting is listed exactly as I had it in the first message.

I did read that there is a Borland tag for the CMake, but couldn't
find a whole lot of documentation on it.

Right now I am trying to create a COM DLL with VS2005 that I can use
in Borland, but that's slow going as it's my first VS project.

Geoff

On Tue, Oct 7, 2008 at 3:58 PM, Robert Osfield [EMAIL PROTECTED] wrote:
 Hi Geoff,

 Borland C++ isn't a compiler that others use in the OSG community, or
 at least not publicly so I'm afraid you are probably on your own with
 the need, and the ability to fix problems.  The OSG is written is
 pretty clean C++ and compiles with a range of compilers so if Borland
 C++ is up to scratch as a Standard C++ compiler then you could
 probably get things to compile.

 For others to help guide you/help you out you'll need to provide more
 information about the OS version, the OSG version, CMake version, as
 well as more details about the specific compiler errors - for instance
 copy the exact compiler error you get and we'll be able to help
 dissect, without this info all we can is shrug our shoulders and move
 on.

 Robert.

 On Tue, Oct 7, 2008 at 8:32 PM, Geoff [EMAIL PROTECTED] wrote:
 Ok, I just recently got tasked with getting some information out of an
 OpenFlight database for use in our current program, which is written
 in Borland C++ Builder 2007 (BCB2007). I tried to open up a sample
 application, and got errors with some of the math functions, which I
 was able to resolve, but now I am getting an error with DatabasePager:

 [BCC32 Error] DatabasePager(375): E2247
 'DatabasePager::_databasePagerThreadPaused' is not accessible

 I was wondering if there was anything special that needed to be done
 to use OSG with BCB2007? I read that I may need to compile it with
 BCB2007 before I can use it, but haven't found anything conclusive
 yet. Could someone point me in the right direction with this?


 Thanks
 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Statistics display without needing a GUIEventHandler

2008-10-15 Thread paul1492
 I previously asked this question about turning on the stats without a key 
process. With osgProducer, I used to do: 
viewerEventHandler-setFrameStatsMode(mode).  

Any chance something could be done with to osgViewer to make turning on the 
Statistics easier.  Seems like others in the OSG community would be interested.

Paul P.

- Original Message 
From: Alexander Löffler [EMAIL PROTECTED]
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Wednesday, October 15, 2008 10:16:02 AM
Subject: Re: [osg-users] Statistics display without needing a GUIEventHandler

Hi Mattias,

Mattias Helsing wrote:
 I do a similar thing with the HelpHandler. I subclassed the
 HelpHandler like below.
 I then instantiate it and add it to the Viewer (and a osgWidget
 menuitem). Then I call initialize on it *before* viewer.run() but
 *after* viewer.realize()

Thanks a lot for your reply. Your solution is similar to what I already had for
my custom StatsHandler, except that I had to include a lot more in the
initialize method, namely the entire switch statement from
StatsHandler::handle() that distinguishes between the different StatsTypes. I
had to change that, too, such that it does not depend on having called the parts
for the previous types when switching on a later type.

I am getting closer now; one thing I still cannot manage to do is display GPU
stats correctly. This works with the original StatHandler, but not with my
modified one. This obviously depends on whether the GraphicsContexts of all
Cameras of the hosting Viewer (just one in my case) support the TimerQuery GL
extension, which they obviously do in general (since the original StatsHandler
shows the stats), but not at the time I check in the modified version. This
seems to be a question of call timing. From what point of rendering progress on
does the GraphicsContext of a Camera support a GL extension, and why does this
not work earlier?

Alex.

 //! Simple wrapper of the osgViewer::HelpHandler to let me initialize
 it before first invocation of it's \c handle()
 struct MyHelpHandler : public osgViewer::HelpHandler
 {
    MyHelpHandler(osg::ApplicationUsage* au) : osgViewer::HelpHandler(au) {};
    void initialize(osgViewer::ViewerBase* viewer)
    {
        if (!_initialized  viewer)
        {
            setUpHUDCamera(viewer);
            setUpScene(viewer);
            if(_camera.valid())
            {
                _camera-setNodeMask(0);
                _helpEnabled = false;
            }
        }
    }
 };
 
 
 On 10/15/08, Alexander Löffler [EMAIL PROTECTED] wrote:
 Hi,

 I am trying to display on-screen statistics as provided by the
 osgViewer::StatsHandler without the need for doing this via handling the key
 presses first. That is, I want to add a command line options to my
 application
 to either display statistics just as frame rate, full stats, or not at all.

 Is there an easy way to do that with the available StatsHandler? I tried
 subclassing from the handler with the option to set the StatsType initially.
 Currently without success, as there seem to be lots of dependencies of what
 parts of OSG have to be set up before collecting of stats is actually
 possible.
 For example, some cameras seem not yet to be set up when I instantiate my
 handler, collecting GPU stats is disabled in my HUD, etc..

 Has anyone ever done something similar before?

 Thanks a lot in advance,
 Alex.
 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Shader Uniform Performance Question(s)

2008-11-19 Thread paul1492
Maybe somebody on this list can save me from reinventing the wheel...

I'm looking to get a better understanding of performance issues related to 
uniforms.

How much overhead is there in having a uniform?  If there only a performance 
hit if the uniform changes values or every frame. What if I change the Uniform 
in OSG to exactly the same value it already has, would there be a performance 
hit?

I have uniforms that might not change values very often. Some are simply 
boolean flags. Can I have different shaders and somehow switch between them?  
Can I recompile the shader on-the-fly (i.e. defining these boolean using 
#define/#if-#endif)? 

In some cases, I have variables which can change within the shader, but I know 
these values when I create the scene graph so I currently use #define instead 
of passing them as uniforms (which will ever only have one value). Does this 
gain me much in performance? 

Also, is there a difference in performance in using four float uniforms 
versus setting a Vec4?

Paul P. 


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


Re: [osg-users] DataVariance

2008-11-20 Thread paul1492
When I change to SingleThreaded, I do not see the problem. The standard OSG 
examples work fine. Other cases of my problem also work fine. 

Clearly, it's something in this app that is causing problems.  In the problem 
case, I'm rendering to two different image buffers and then reading the images 
out on the CPU. My scene is a normal scene except I have two cameras with 
each rendering to these different textures (i.e. a top and bottom view of the 
scene). I also have another camera rendering an orthogonal projection on top of 
the scene.

Paul P.

 
- Original Message 
From: Robert Osfield [EMAIL PROTECTED]
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Wednesday, September 17, 2008 11:03:33 AM
Subject: Re: [osg-users] DataVariance

Hi Paul,

I can't say why your app might be hanging.  Do the standard OSG
example hang on your machine?

Try running the view single threaded as something that might at least
flesh out whether threading is an issue at all.

Robert.

On Wed, Sep 17, 2008 at 3:52 PM,  [EMAIL PROTECTED] wrote:
 Thanks for the quick response...

 Then, any idea why my application is hanging when I attempt to render my 
 first frame?? Below is the call stack of the two OSG threads.

 The problem seems to exist when I include two different parts of my scene 
 graph.  My scene graph consists of two Camera's at the root. Each renders to 
 a different image array (using camera-attach(..., image);).

 Each camera then has shared subgraphs attached which also contain a Camera 
 node (for Ortho view for part of the scene) but with no attachments.

 The osgViewer's camera is unchanged (and I really don't need to render 
 anything).

 Am I doing something wrong with these camera's?

 While I'm at it, one more questions:
 Is there  a way to turn on the OSG statistics overlay without using the 
 keyboard. I've added the StatsHandler event handler. With osgProducer, I used 
 to be able to do viewerEventHandler-setFrameStatsMode(mode).

 Paul P.

 THREAD #1
 #0  0x4146627d in pthread_cond_wait@@GLIBC_2.3.2 ()
    from /lib/tls/libpthread.so.0
 #1  0x41235a66 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libc.so.6
 #2  0x40b1e364 in OpenThreads::Condition::wait (this=0x8281f88,
    mutex=0x8281f80)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThreadCondition.c++:137
 #3  0x40ad9241 in OpenThreads::BlockCount::block (this=0x8281f80) at Block:133
 #4  0x40ad7506 in osgViewer::ViewerBase::renderingTraversals (this=0x827ab58)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/ViewerBase.cpp:733
 #5  0x40ad6a88 in osgViewer::ViewerBase::frame (this=0x827ab58,
    simulationTime=0)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/ViewerBase.cpp:592
 #6  0x080858a7 in MyViewer::frame (this=0x827aad8, simTime=0)
    at MyViewer.hpp:131

 THREAD #2
 #0  0x4146627d in pthread_cond_wait@@GLIBC_2.3.2 ()
    from /lib/tls/libpthread.so.0
 #1  0x41235a66 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libc.so.6
 #2  0x40b1e364 in OpenThreads::Condition::wait (this=0x82786dc,
    mutex=0x82786d4)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThreadCondition.c++:137
 #3  0x400aedf5 in OpenThreads::Block::block (this=0x82786d4) at Block:42
 #4  0x40a8cdc7 in osgViewer::Renderer::TheadSafeQueue::takeFront (
    this=0x82786cc)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/Renderer.cpp:136
 #5  0x40a8ee38 in osgViewer::Renderer::draw (this=0x8278640)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/Renderer.cpp:340
 #6  0x40a9085e in osgViewer::Renderer::operator() (this=0x8278640,
    context=0x8272258)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/Renderer.cpp:640
 #7  0x4086352d in osg::GraphicsContext::runOperations (this=0x8272258)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsContext.cpp:688
 #8  0x4086c3ee in osg::RunOperations::operator() (this=0x829ea70,
 -    context=0x8272258)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsThread.cpp:134
 #9  0x4086bc7d in osg::GraphicsOperation::operator() (this=0x829ea70, 
 object=Internal: global symbol `Object' found in RissAnimationPath.cpp 
 psymtab but not in symtab.
 Object may be an inlined function, or may be a template function
 (if a template, try specifying an instantiation: Objecttype).
 )
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsThread.cpp:50
 #10 0x408af928 in osg::OperationThread::run (this=0x829e810)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/OperationThread.cpp:413
 #11 0x4086bbf9 in osg::GraphicsThread::run (this=0x829e810)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsThread.cpp:38
 #12 0x40b1d672 in OpenThreads::ThreadPrivateActions::StartThread (
    data=0x829e820)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThread.c++:170

Re: [osg-users] DataVariance

2008-11-24 Thread paul1492
I attempted to set all my nodes and state sets to DYNAMIC data variance by 
doing the following and it still is locking up on me (i.e. with the same call 
stack as below):

   SetDataVariance dataVariance;
   root-accept(dataVariance);

Where:

class SetDataVariance : public osg::NodeVisitor
{
public:
   SetDataVariance():   
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN)
 {};
   virtual void apply(osg::Node node);
   virtual void apply(osg::Geode node);
};
void SetDataVariance::apply(osg::Node node)
{
   node.getOrCreateStateSet()-setDataVariance(osg::Object::DYNAMIC);
   traverse(node);
}
void SetDataVariance::apply(osg::Geode geode)
{
    geode.getOrCreateStateSet()-setDataVariance(osg::Object::DYNAMIC);    
    geode.setDataVariance(osg::Object::DYNAMIC);
    for(unsigned int i=0;igeode.getNumDrawables();++i)
    {
    osg::Drawable* drawable = geode.getDrawable(i);
    if (drawable)
    {
   
drawable-getOrCreateStateSet()-setDataVariance(osg::Object::DYNAMIC);
   drawable-setDataVariance(osg::Object::DYNAMIC);
    }
    }
}

Removing a portion of my scene graph and the problem goes away (or is 
hidden)..  In particular, if I remove the node-addDrawable(geometry), the 
problem goes away. The problem exists even if node-addDrawable( new 
osg::Geometry).   In addition, turning off optimization doesn't seem to help. 
As I said before, using single threaded viewer and it works fine.
 
Any idea what is going on?
 
Paul P.

- Original Message 
From: Robert Osfield [EMAIL PROTECTED]
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Friday, November 21, 2008 4:10:20 AM
Subject: Re: [osg-users] DataVariance

Hi Paul P.

You will have to debug this on your own I'm afraid, this type of issue
is not something one can resolve without seeing it first hand.

The best I can do is recommend that look into the using DataVariance
set to DYNAMIC on all StateSet and Drawable that you have in your
scene.  This is the most likely cause of problems like this, but we've
already recommended this and you've made no comment whether you've
tried this.  There have been lots written on this topic on osg-users
so please don't overlook the archives.

Robert.

On Thu, Nov 20, 2008 at 7:32 PM,  [EMAIL PROTECTED] wrote:
 When I change to SingleThreaded, I do not see the problem. The standard OSG 
 examples work fine. Other cases of my problem also work fine.

 Clearly, it's something in this app that is causing problems.  In the problem 
 case, I'm rendering to two different image buffers and then reading the 
 images out on the CPU. My scene is a normal scene except I have two cameras 
 with each rendering to these different textures (i.e. a top and bottom view 
 of the scene). I also have another camera rendering an orthogonal projection 
 on top of the scene.

 Paul P.


 - Original Message 
 From: Robert Osfield [EMAIL PROTECTED]
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Sent: Wednesday, September 17, 2008 11:03:33 AM
 Subject: Re: [osg-users] DataVariance

 Hi Paul,

 I can't say why your app might be hanging.  Do the standard OSG
 example hang on your machine?

 Try running the view single threaded as something that might at least
 flesh out whether threading is an issue at all.

 Robert.

 On Wed, Sep 17, 2008 at 3:52 PM,  [EMAIL PROTECTED] wrote:
 Thanks for the quick response...

 Then, any idea why my application is hanging when I attempt to render my 
 first frame?? Below is the call stack of the two OSG threads.

 The problem seems to exist when I include two different parts of my scene 
 graph.  My scene graph consists of two Camera's at the root. Each renders to 
 a different image array (using camera-attach(..., image);).

 Each camera then has shared subgraphs attached which also contain a Camera 
 node (for Ortho view for part of the scene) but with no attachments.

 The osgViewer's camera is unchanged (and I really don't need to render 
 anything).

 Am I doing something wrong with these camera's?

 While I'm at it, one more questions:
 Is there  a way to turn on the OSG statistics overlay without using the 
 keyboard. I've added the StatsHandler event handler. With osgProducer, I 
 used to be able to do viewerEventHandler-setFrameStatsMode(mode).

 Paul P.

 THREAD #1
 #0  0x4146627d in pthread_cond_wait@@GLIBC_2.3.2 ()
    from /lib/tls/libpthread.so.0
 #1  0x41235a66 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libc.so.6
 #2  0x40b1e364 in OpenThreads::Condition::wait (this=0x8281f88,
    mutex=0x8281f80)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThreadCondition.c++:137
 #3  0x40ad9241 in OpenThreads::BlockCount::block (this=0x8281f80) at 
 Block:133
 #4  0x40ad7506 in osgViewer::ViewerBase::renderingTraversals (this=0x827ab58)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/ViewerBase.cpp:733
 #5  0x40ad6a88 in osgViewer::ViewerBase::frame (this=0x827ab58,
    

Re: [osg-users] Temporal Averaging

2009-09-09 Thread paul1492
Thanks JP for the response but I'm not sure I understand..

I want frames 0 to 14 (and 16-30, 32-46, etc) to be done as fast as possible 
and not wait on VSYNC. I only want the rendering of the 15th frame (and 31, 47, 
etc) to wait on VSYNC. 

If by frame, you mean a call to osgViewer::frame, then I'm confused on how to 
make this call sometimes block on VSYNC and other times not..

SHORT FORM of my original question: 
If I can have a shared scene graph attached to multiple camera, how do I update 
my scene graph (i.e. change a MatrixTransform) such that different scenes are 
drawn for each camera? 

LONG FORM of my question:
To restate my original problem, I have a scene graph representing my scene. I 
currently move my players in the scene graph using an update callback on a 
MatrixTransform. Now, I want to add the ability to average up to 16 frames 
together before sending it to the frame buffer. Since I will be using a shader 
to average my subframes and I'm not allowed to have the same (accumulator 
buffer) temporary buffer used as an input to a shader as well as a rendering 
target, I assume I'll need 16 camera each rendering an appropriate rendering 
texture and configured with an input texture. I would then have my (common) 
scene attach to each of these cameras.

My problem is that as I understand OSG and osgViewer, it will perform an update 
traversal on the entire scene graph (ie.all cameras) before proceeding to the 
cull traversal. If I move my players in my update callback, by the time I get 
to the cull operation, all the cameras will be looking at a (common) scene with 
the MatrixTransform nodes now only having the FINAL player position 
information. OSG also seems to do a cull on the entire scene graph as well.  Is 
there a way to do an update/cull/draw on a per camera basis before moving to 
the next camera in the scene graph?

I hope this makes sense.

Paul P.


- Original Message 
From: J.P. Delport jpdelp...@csir.co.za
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Wednesday, August 19, 2009 3:22:04 AM
Subject: Re: [osg-users] Temporal Averaging

Hi,

paul1...@yahoo.com wrote:
 I know I've asked similar questions before but now I'm looking to use
 OSG to perform temporal averaging differently than I've asked before.
 
 
 Is there a way to perform an update, cull and draw on only a
 sub part of the scene graph?
 
 I want to average (say) 16 successive frames. For example,frames 1-16
 should be average together and the final average being sent to the
 frame buffer. Same for frames 17-32, 33-48, etc.
 
 To do this, I assume I'll need 16 cameras all looking at the same
 scene graph. The first 15 would be rendering to a texture which is
 passed to the next camera while the last simply renders to frame
 buffer. Since I want to move the players slightly between each
 camera node, how would I do this? Normally, an update callback would
 be called on the entire scene graph but I'll have a shared scene
 graph so I don't think this will work.
 
 Any words of advice?

Maybe:
Create main texture (mt) to be used by main camera (MC).
Create 16 cameras for RTT (RTT1-16) with 16 textures (st1-16), this is where 
your scene is attached.
Create one RTT camera (AV) to do average of 16 textures and render to mt

frame 0: enable RTT1, disable AV, MC renders mt
frame 1: enable RTT2, MC renders mt
...
frame 15: enable RTT16, enable AV and render to mt, MC renders mt.
frame 16: enable RTT1, disable AV, MC renders mt
...

IOW main camera texture would only update every 16th frame. Updates to the 
scene would be like normal between the frames. So the rendering is more spread 
out and not compressed into a single main frame. The overhead of rendering the 
main texture 16 times should be minimal, unless you have vsync :( Maybe you can 
disable swapping for the in between frames.

You might also be able to get away with less cameras and flip flopping the sum 
texture and the main texture.

jp


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

-- This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. The full 
disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

___
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] Frame Count/Threading Models

2009-11-04 Thread paul1492
I was using glXWaitVideoSyncSGI() in a Pre Draw Callback (the place I need it 
to be) to get the current Frame Count from the video card. I've recently found 
out that this Frame Count number from this function can be incorrect when I'm 
reading textures from the GPU to the CPU or writing textures from the CPU to 
the GPU. In particular, I would see about 100ms between calls to 
glXWaitVideoSyncSGI but the frame counter returned would either be consecutive 
(i.e. no missed frames) or skipping one number (i.e. one missed frame). I'm 
running at 60 Hz (16ms frames).

Therefore, I'm now trying to use glXQueryFrameCountNV() (I have G-SYNC II card 
and have enabled Frame Lock). It would appear I need to call this when I have a 
valid Graphics Context. I assume this isn't normally the case in a 
PreDrawCallback.  I've had to do this in the PreDrawCallback:
    if (camera.getGraphicsContext() 
    camera.getGraphicsContext()-valid() 
    camera.getGraphicsContext()-isRealized())
    {
    osg::GraphicsContext* gc = 
const_castosg::GraphicsContext*(camera.getGraphicsContext());
    gc-makeCurrent();
    }
followed by my call to glXQueryFrameCountNV().

However, to make this work, I've had to set my osgViewer's threading model to 
SingleThreaded. If I don't do this I usually see a Xlib: unexpected async 
reply (sequence 0x6a)! message followed by a segmentation fault.

What am I doing wrong? Is there some better way to do something in a valid 
graphics context when not in a draw callback?

Paul P.


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


[osg-users] Setting CullVisitor

2009-11-10 Thread paul1492
How do I set my own custom CullVisitor? I'm doing the following:

   osg::Camera  *camera = viewer.getCamera();
   osgViewer::Renderer *render =
    dynamic_castosgViewer::Renderer *(camera-getRenderer());
   if (!render)
   {
  return false;
   }
 
   osgUtil::CullVisitor *cv = new myCullVisitor;
   render-getSceneView(0)-setCullVisitor(cv);

I seem to be calling my cull visitor every other frame and it looks like the 
renderer has multiple SceneViews. Should I be iteratoring over the scene views 
attached to the renderer? Why do I have multiple SceneViews? 

Is there a better way? I can not find examples on how to do this..

I need my own CullVisitor because I've defined my own node type that needs 
special cull handling.

I'm using OSG 2.6.

Paul P.


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


Re: [osg-users] Setting CullVisitor

2009-11-10 Thread paul1492
Thanks for the quick response...

Did this:
   render-getSceneView(0)-setCullVisitor(cv);
   render-getSceneView(1)-setCullVisitor(cv);

and now I'm getting:
Warning:createOrReuseRenderLeaf() skipping multiply refrenced entry.
Warning:createOrReuseRenderLeaf() skipping multiply refrenced entry.
Warning:createOrReuseRenderLeaf() skipping multiply refrenced entry.
Warning:createOrReuseRenderLeaf() skipping multiply refrenced entry.

Paul P.

 
- Original Message 
From: Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Tue, November 10, 2009 8:57:38 AM
Subject: Re: [osg-users] Setting CullVisitor

Hi Paul,

 Why do I have multiple SceneViews? 

There are always two SceneViews if you're using multithreading - they're used 
on alternating frames as you've seen. Just set your CullVisitor for both, or a 
separate instance of your CullVisitor for each instance.

Whenever I've had to change something on SceneView instances, I had to do it on 
both instances. I expect if your CullVisitor has some local state, you'd have 
to use two separate instances, one for each SceneView, so that threading works 
correctly and doesn't try to modify data that's being read in another thread.

 I need my own CullVisitor because I've defined my own node type that needs 
 special cull handling.

You could just override the traverse() method of your node type, that's how I 
normally do it. It keeps changes local to the overridden node class instead of 
propagating changes to other parts of the app.

  void traverse(osg::NodeVisitor nv)
  {
      if (nv.getVisitorType() == osg::NodeVisitor::CULL_VISITOR)
      {
          osgUtil::CullVisitor* cv =
              dynamic_castosgUtil::CullVisitor*(nv);

          // ...
      }
      osg::Node::traverse(nv);  // call base class version.
      // (replace Node by whatever the base class of your overridden
      //  node type is)
  }

Hope this helps,

J-S
-- __
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                              http://www.cm-labs.com/
                        http://whitestar02.webhop.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


Re: [osg-users] Frame Count/Threading Models

2009-12-10 Thread paul1492
Any idea why glXWaitVideoSyncSGI() doesn't seem to work (see 1st paragraph 
below) or whyc glXQueryFrameCountNV() seems to take a long time to execute 
(i.e. upwards of 12ms just to do this call). Are others having trouble with 
either of these. I updated my NVIDIA driver to 190.42 and that didn't help any.

Paul P.

- Original Message 
From: paul1...@yahoo.com paul1...@yahoo.com
To: osg-users@lists.openscenegraph.org
Sent: Wed, November 4, 2009 9:20:40 AM
Subject: [osg-users] Frame Count/Threading Models

I was using glXWaitVideoSyncSGI() in a Pre Draw Callback (the place I need it 
to be) to get the current Frame Count from the video card. I've recently found 
out that this Frame Count number from this function can be incorrect when I'm 
reading textures from the GPU to the CPU or writing textures from the CPU to 
the GPU. In particular, I would see about 100ms between calls to 
glXWaitVideoSyncSGI but the frame counter returned would either be consecutive 
(i.e. no missed frames) or skipping one number (i.e. one missed frame). I'm 
running at 60 Hz (16ms frames).

Therefore, I'm now trying to use glXQueryFrameCountNV() (I have G-SYNC II card 
and have enabled Frame Lock). It would appear I need to call this when I have a 
valid Graphics Context. I assume this isn't normally the case in a 
PreDrawCallback.  I've had to do this in the PreDrawCallback:
    if (camera.getGraphicsContext() 
    camera.getGraphicsContext()-valid() 
    camera.getGraphicsContext()-isRealized())
    {
    osg::GraphicsContext* gc = 
const_castosg::GraphicsContext*(camera.getGraphicsContext());
    gc-makeCurrent();
    }
followed by my call to glXQueryFrameCountNV().

However, to make this work, I've had to set my osgViewer's threading model to 
SingleThreaded. If I don't do this I usually see a Xlib: unexpected async 
reply (sequence 0x6a)! message followed by a segmentation fault.

What am I doing wrong? Is there some better way to do something in a valid 
graphics context when not in a draw callback?

Paul P.


      
___
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] OverlayNode question

2009-04-15 Thread paul1492

Can somebody give me a explanation of how an OverlayNode is used?

I need to render some geometry stuff (i.e. geopolitical, grid lines) on top of 
terrain elevation geometry and currently, I'm rendering to a texture and laying 
this texture on my terrain polygons. 

Should I be using an Overlay node for this? If so, I'm confused by how the 
OverlayNode should be configured.

Thanks,
Paul P.


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


[osg-users] Multiple Shaders Performance Question

2009-04-27 Thread paul1492

I have multiple shaders. I attach one shader to the root of the scene graph. I 
then load in objects and attach one of another set of shaders to the root of 
the object and attach it to the main scene graph. When I say attach a shader, 
I'm loading a fragment and vertex shader from a file and attaching them to a 
new Program object each time. I then attach the Program object to the object's 
state set.

Is there any performance advantage to doing it this way or creating one Program 
object for each shader and attach these same Program object to my objects. Or 
should I be creating a set of StateSet's and attaching the appropriate StateSet 
to my object based on the Shader I want to use.

To complicate things, I have multiple cameras used to render to multiple Frame 
Buffer Objects.

What I'm seeing is a (single) missed frame when an object with a new shader 
appears in the Field of View (running at 120Hz)?

Could OSG be attempting to recompile my shader? Is driver downloading the 
shader each time to the video card.

Paul P.


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


Re: [osg-users] Multiple Shaders Performance Question

2009-04-28 Thread paul1492

Thanks Robert,

I am using OSG 2.6 on Linux with NVIDIA Quadro FX 4600 with driver version 
173.14.09...

How do I make sure my scene graph is precompiled? I thought OSG took care of 
this on its first frame using the GLObjectsVisitor in SceneView::init() but in 
your catch.cpp example, I see you are doing it manually. 

I am using osgViewer to render the scene.

Paul P.


- Original Message 
From: Robert Osfield robert.osfi...@gmail.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Tuesday, April 28, 2009 4:29:13 AM
Subject: Re: [osg-users] Multiple Shaders Performance Question

Hi Paul,

Different drivers manage compilation and linking in different ways on
different drivers so it's hard to give any hard rules.

In general making sure your scene graph is pre-compile before
rendering helps avoid most problems with compiles occur during
rendering.

Robert.

On Tue, Apr 28, 2009 at 2:46 AM,  paul1...@yahoo.com wrote:

 I have multiple shaders. I attach one shader to the root of the scene graph. 
 I then load in objects and attach one of another set of shaders to the root 
 of the object and attach it to the main scene graph. When I say attach a 
 shader, I'm loading a fragment and vertex shader from a file and attaching 
 them to a new Program object each time. I then attach the Program object to 
 the object's state set.

 Is there any performance advantage to doing it this way or creating one 
 Program object for each shader and attach these same Program object to my 
 objects. Or should I be creating a set of StateSet's and attaching the 
 appropriate StateSet to my object based on the Shader I want to use.

 To complicate things, I have multiple cameras used to render to multiple 
 Frame Buffer Objects.

 What I'm seeing is a (single) missed frame when an object with a new shader 
 appears in the Field of View (running at 120Hz)?

 Could OSG be attempting to recompile my shader? Is driver downloading the 
 shader each time to the video card.

 Paul P.



 ___
 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] Frame Averaging

2009-05-05 Thread paul1492

I asked a similar question to this several months ago...

I'm looking to average several frames together, however, this time I want to 
average discrete frames. That is, I want to average, for example, the first X 
frames and then display the results and then average the next X frames and 
display the results where X might change while running.  I want to do an 
update traversal for each of the X frames to move my players as we are doing 
the averaging.

I am using shaders and am rendering to a texture. 

Would I need to setup Y camera (where Y is the maximum frames to average  X), 
and do a multple pass rendering ping ponging the rendering texture. I would 
then need to switch off all Cameras X and Y. Then in my shaders I would need 
to take the output and divide by X and add to the running average texture. 

Is there an easier way??  Would osgPPU help?

Any help (before I make a mess of my current code) is greatly appreciated.

Paul P.


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


[osg-users] OSG and QT example

2009-05-07 Thread paul1492

Is there a more complex example of using QT (4.5) with OSG (2.8) than the 
osgviewerQT example?  I want to use the AdapterWidget and interface an OSG 
viewer to a QT form which has been designed with buttons/controls using QT 
Designer.

Thanks in advance,
Paul P.


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


[osg-users] Remote execution and OSG

2009-05-14 Thread paul1492

I need to be able to run my OSG program remotely (from a different machine that 
where the display location). I'm using ssh to login to the remote location 
and have my setenv DISPLAY set back to my original computer (I've set xhost + 
on the server machine).

When I do this, on SOME OSG examples, I'm getting:
Xlib: connection to :0.0 refused by server
Xlib: No protocol specified

Error: Unable to open display :0.0.
Error: unable to create graphics window

I haven't narrowed down when I get this but it seems that I get it only when I 
run applications that create their own windows. I do not see this when running 
osgviewer in full screen mode nor with many of the other OSG examples. However, 
I do see this problem with osgkeyboardmouse, osgcompositeviewer, osgsidebyside, 
osgtexture3D, osgslice,  and osgwindows. In these cases, instead of opening up 
a window as I think these are supposed to do, it runs full screen.

Any idea what is going on here?

Paul P.


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


Re: [osg-users] Remote execution and OSG

2009-05-14 Thread paul1492

Yes, I am using Redhat Linux with OSG 2.9.3.  

Using ssh -Y didn't help...

Also, as I pointed out in my last e-mail, I get this X11 connection refused, 
however, the application still runs but FULL SCREEN instead of in a window...  

Paul P.


- Original Message 
From: Thrall, Bryan bryan.thr...@flightsafety.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Thursday, May 14, 2009 1:35:45 PM
Subject: Re: [osg-users] Remote execution and OSG

paul1...@yahoo.com wrote on Thursday, May 14, 2009 12:28 PM:

 I need to be able to run my OSG program remotely (from a different machine
 that where the display location). I'm using ssh to login to the remote
 location and have my setenv DISPLAY set back to my original computer (I've
 set xhost + on the server machine).  
 
 When I do this, on SOME OSG examples, I'm getting:
 Xlib: connection to :0.0 refused by server
 Xlib: No protocol specified
 
 Error: Unable to open display :0.0.
 Error: unable to create graphics window
 
 I haven't narrowed down when I get this but it seems that I get it only when
 I run applications that create their own windows. I do not see this when
 running osgviewer in full screen mode nor with many of the other OSG
 examples. However, I do see this problem with osgkeyboardmouse,
 osgcompositeviewer, osgsidebyside, osgtexture3D, osgslice,  and osgwindows.
 In these cases, instead of opening up a window as I think these are supposed
 to do, it runs full screen.      
 
 Any idea what is going on here?

Not sure what's wrong with your DISPLAY, but 'ssh -Y' will tunnel the X 
connection through ssh and set up the DISPLAY correctly (usually to something 
like 'localhost:10.0') without you having to mess with it.

You don't say, but I'm assuming you're running Linux or something like that; 
OSG compiled for Windows doesn't do X forwarding :)

-- 
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
___
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


Re: [osg-users] Remote execution and OSG

2009-05-14 Thread paul1492

Already tried xhost +.. No help..

What is so special about osgkeyboardmouse, osgcompositeviewer, osgsidebyside, 
osgtexture3D, osgslice,  and osgwindows that would cause them not to work but 
other do?  osgviewer --window seems to work fine..  Does this have something 
to do with the GraphicsContext?

Paul P.


- Original Message 
From: Simon Hammett s.d.hamm...@googlemail.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Thursday, May 14, 2009 2:58:09 PM
Subject: Re: [osg-users] Remote execution and OSG

Don't you have to grant access on your machine to remote connections?
IIRC, try 'xhost +' on your machine before starting the program on the
remote machine.

2009/5/14  paul1...@yahoo.com:

 Yes, I am using Redhat Linux with OSG 2.9.3.

 Using ssh -Y didn't help...

 Also, as I pointed out in my last e-mail, I get this X11 connection refused, 
 however, the application still runs but FULL SCREEN instead of in a window...

 Paul P.


 - Original Message 
 From: Thrall, Bryan bryan.thr...@flightsafety.com
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Sent: Thursday, May 14, 2009 1:35:45 PM
 Subject: Re: [osg-users] Remote execution and OSG

 paul1...@yahoo.com wrote on Thursday, May 14, 2009 12:28 PM:

 I need to be able to run my OSG program remotely (from a different machine
 that where the display location). I'm using ssh to login to the remote
 location and have my setenv DISPLAY set back to my original computer (I've
 set xhost + on the server machine).

 When I do this, on SOME OSG examples, I'm getting:
 Xlib: connection to :0.0 refused by server
 Xlib: No protocol specified

 Error: Unable to open display :0.0.
 Error: unable to create graphics window

 I haven't narrowed down when I get this but it seems that I get it only when
 I run applications that create their own windows. I do not see this when
 running osgviewer in full screen mode nor with many of the other OSG
 examples. However, I do see this problem with osgkeyboardmouse,
 osgcompositeviewer, osgsidebyside, osgtexture3D, osgslice,  and osgwindows.
 In these cases, instead of opening up a window as I think these are supposed
 to do, it runs full screen.

 Any idea what is going on here?

 Not sure what's wrong with your DISPLAY, but 'ssh -Y' will tunnel the X 
 connection through ssh and set up the DISPLAY correctly (usually to something 
 like 'localhost:10.0') without you having to mess with it.

 You don't say, but I'm assuming you're running Linux or something like that; 
 OSG compiled for Windows doesn't do X forwarding :)

 --
 Bryan Thrall
 FlightSafety International
 bryan.thr...@flightsafety.com
 ___
 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




-- 
http://www.ssTk.co.uk
___
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


Re: [osg-users] Remote execution and OSG

2009-05-21 Thread paul1492

Thanks Robert.. That helped... 

But I'm having way too much fun interfacing OSG to Qt to stop there:-).  I seem 
to be able to get it to work now but I'm having trouble running on a LINUX 
machine but shooting my display to a PC running Hummingbird Exceed 3D (my 
actual requirement). I'm logged into the PC and then use exceed to 
remotely login to a LINUX machine.  I seem to have trouble switching to a valid 
Graphics Context (i.e. glGetString(GL_VERSION) returns null string within OSG) 
and causes OSG to seg fault... Logging remotely into a LINUX machine and 
shooting the display to another LINUX machine works fine.

Am I setting up my graphics context incorrectly?  I'm not using the 
AdapterWidget from the example. I'm also having trouble getting 
GraphicsWindowEmbedded to work...

So, here is what I'm doing:

myViewer::myViewer(void)
{
   mViewer = new osgViewer::Viewer;
   mViewer-setThreadingModel(osgViewer::Viewer::SingleThreaded);
   mViewer-setCameraManipulator(new osgGA::TrackballManipulator);
   mCamera = mViewer-getCamera();
}

void myViewer::initialize(int height, int width)
{
   osg::ref_ptrosg::GraphicsContext::Traits traits =
  new osg::GraphicsContext::Traits;
   
   traits-readDISPLAY();   
   traits-doubleBuffer = true;
   traits-useCursor    = false;
   traits-x    = 0;
   traits-y    = 0;
   traits-width    = width;
   traits-height   = height;
   
   osg::ref_ptrosg::Referenced windata =
  new osgViewer::GraphicsWindowX11::WindowData(mGLWindow);
   
   traits-inheritedWindowData = windata;
   
   osg::GraphicsContext* gc;

   gc = osg::GraphicsContext::createGraphicsContext(traits.get());
   mCamera-setGraphicsContext(gc);

   mCamera-setClearColor(osg::Vec4(0.5235, 0.8745, 1.0, 1.0));
   mCamera-setViewport(traits-x,
    traits-y,
    traits-width,
    traits-height);
   mViewer-setCamera(mCamera.get());
   mViewer-setSceneData(osgDB::readNodeFile(cow.osg));
}

I am calling the myViewer-initialize() method in another class derived from a 
QGLWidget and where it is called in its first paintGL callback. I'm also 
calling the myViewer-frame() call in this callback which simply calls 
mViewer-frame().

I'm using Qt's QGLWidget's window ID (i.e. winId() stored in mGLWindow) to set 
the inheritedWindowData.  Is this okay to do it? If I don't do this 
initialization of the inheritedWindowData data, my widget DOES appear (in all 
cases) except it is detached from my Qt application.

I'm not sure if this is my programming problem, an Hummingbird Exceed problem 
or a Qt problem.

Can anybody help?  I've been working on this for weeks...

Thanks,
Paul P.


 
- Original Message 
From: Robert Osfield robert.osfi...@gmail.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Friday, May 15, 2009 4:24:08 AM
Subject: Re: [osg-users] Remote execution and OSG

HI Paul, J.P, et. al,

On Fri, May 15, 2009 at 8:56 AM, J.P. Delport jpdelp...@csir.co.za wrote:
 Not sure, but it looks like some code ignores the $DISPLAY setting and just
 tries to open :0.0.

 I can confirm that I get the same behaviour between two Debian machines:
 osgviewer cow.osg runs at a staggering 2fps

 osgkeyboardmouse fails with:
 No protocol specified
 Error: Unable to open display :0.0.
 Error: unable to create graphics window.

The GraphicsContext::Traits structure is used to control how the
graphics window is created, and in it's default state the display and
screen settings (see osg::GraphicsContext::ScreenIndentifier) are 0:0.
  To override this default one needs to explictly call readDISPLAY()
which reads the DISPLAY env variable to set the display and screen
number.

Now the osgView::setUpView*() methods all call readDISPLAY(), but if
the example does use on of these methods, and instead creates the
GraphicsWindow it requires directly use GraphicsContext::Traits
without calling the readDISPLAY then it won't pick up your settings of
this variable, so you'll get different behavior.

Robert.
___
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


Re: [osg-users] Remote execution and OSG

2009-05-26 Thread paul1492

Let me ask a slightly different question... Why do I only get half a cow (see 
attachment on my original post) even when I run on just a local machine.  Seems 
I get more cow showing when I decrease the resolution of my video display...

Paul P. 



- Original Message 
From: paul1...@yahoo.com paul1...@yahoo.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Friday, May 22, 2009 8:03:36 AM
Subject: Re: [osg-users] Remote execution and OSG

Let me also add that I see the same problem (program seg faults when running on 
a LINUX machine and shooting the display to a PC using Hummingbird Exceed 3D) 
when running:
% osgviewerQT --QOSGWidget cow.osg

with OSG 2.9.3 and 2.8.

It also produces the following X error:
X Error: BadMatch (invalid parameter attributes) 8
  Extension:    134 (Uknown extension)
  Minor opcode: 5 (Unknown request)
  Resource id:  0x2c1

In addition, when I run this command on a (single) LINUX machine, I only get 
half a cow...

Is this a problem with OSG or is this an Exceed 3D problem?  I know another 
person recently resolved a crash on the same example by updating the video 
driver.  I assume this isn't my problem here.

Paul P.


- Original Message 
From: paul1...@yahoo.com paul1...@yahoo.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Thursday, May 21, 2009 7:17:36 PM
Subject: Re: [osg-users] Remote execution and OSG


Thanks Robert.. That helped... 

But I'm having way too much fun interfacing OSG to Qt to stop there:-).  I seem 
to be able to get it to work now but I'm having trouble running on a LINUX 
machine but shooting my display to a PC running Hummingbird Exceed 3D (my 
actual requirement). I'm logged into the PC and then use exceed to 
remotely login to a LINUX machine.  I seem to have trouble switching to a valid 
Graphics Context (i.e. glGetString(GL_VERSION) returns null string within OSG) 
and causes OSG to seg fault... Logging remotely into a LINUX machine and 
shooting the display to another LINUX machine works fine.

Am I setting up my graphics context incorrectly?  I'm not using the 
AdapterWidget from the example. I'm also having trouble getting 
GraphicsWindowEmbedded to work...

So, here is what I'm doing:

myViewer::myViewer(void)
{
   mViewer = new osgViewer::Viewer;
   mViewer-setThreadingModel(osgViewer::Viewer::SingleThreaded);
   mViewer-setCameraManipulator(new osgGA::TrackballManipulator);
   mCamera = mViewer-getCamera();
}

void myViewer::initialize(int height, int width)
{
   osg::ref_ptrosg::GraphicsContext::Traits traits =
  new osg::GraphicsContext::Traits;
   
   traits-readDISPLAY();   
   traits-doubleBuffer = true;
   traits-useCursor    = false;
   traits-x    = 0;
   traits-y    = 0;
   traits-width    = width;
   traits-height   = height;
   
   osg::ref_ptrosg::Referenced windata =
  new osgViewer::GraphicsWindowX11::WindowData(mGLWindow);
   
   traits-inheritedWindowData = windata;
   
   osg::GraphicsContext* gc;

   gc = osg::GraphicsContext::createGraphicsContext(traits.get());
   mCamera-setGraphicsContext(gc);

   mCamera-setClearColor(osg::Vec4(0.5235, 0.8745, 1.0, 1.0));
   mCamera-setViewport(traits-x,
    traits-y,
    traits-width,
    traits-height);
   mViewer-setCamera(mCamera.get());
   mViewer-setSceneData(osgDB::readNodeFile(cow.osg));
}

I am calling the myViewer-initialize() method in another class derived from a 
QGLWidget and where it is called in its first paintGL callback. I'm also 
calling the myViewer-frame() call in this callback which simply calls 
mViewer-frame().

I'm using Qt's QGLWidget's window ID (i.e. winId() stored in mGLWindow) to set 
the inheritedWindowData.  Is this okay to do it? If I don't do this 
initialization of the inheritedWindowData data, my widget DOES appear (in all 
cases) except it is detached from my Qt application.

I'm not sure if this is my programming problem, an Hummingbird Exceed problem 
or a Qt problem.

Can anybody help?  I've been working on this for weeks...

Thanks,
Paul P.


 
- Original Message 
From: Robert Osfield robert.osfi...@gmail.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Friday, May 15, 2009 4:24:08 AM
Subject: Re: [osg-users] Remote execution and OSG

HI Paul, J.P, et. al,

On Fri, May 15, 2009 at 8:56 AM, J.P. Delport jpdelp...@csir.co.za wrote:
 Not sure, but it looks like some code ignores the $DISPLAY setting and just
 tries to open :0.0.

 I can confirm that I get the same behaviour between two Debian machines:
 osgviewer cow.osg runs at a staggering 2fps

 osgkeyboardmouse fails with:
 No protocol specified
 Error: Unable to open display :0.0.
 Error: unable to create graphics window.

The GraphicsContext::Traits structure is used to control how the
graphics window is created, and in it's default state the display and
screen settings (see 

[osg-users] ref_ptr question

2009-06-24 Thread paul1492

What is the easiest way to determine if a particular node is being deleted from 
memory? I have a relatively complex scene and part of the scene needs to be 
deleted and reconstructed at times. I'm concerned there might be a memory leak 
and that some of my nodes are not being freed because we aren't using ref_ptr 
where we need them.

Paul P.


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


[osg-users] __GL_SYNC_TO_VBLANK

2009-07-15 Thread paul1492

I know this is a strange question but is there a way to programmatically (and 
dynamically) to do what the __GL_SYNC_TO_VBLANK environment variable does?

I want to sync every n-th frame to VBLANK and let all the other frames 
free-run. Put another way, only the n-th frame will be visualized and all the 
other frames will be generating intermediate results. Also, n can vary 
dynamically as the program is running.

Thanks for your help,
Paul P.



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


[osg-users] DrawCallback and Textures

2009-07-20 Thread paul1492

Can I modify a Texture image in a DrawCallback or do I need to do this in an 
UpdateCallback?

I need to modify a texture image every frame as well as the polygon's 
coordinates. I'll be disabling Display Lists on the polygon and I have a Vertex 
and Fragment shader attached to the polygon.

Paul P.


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


[osg-users] Temporal Averaging

2009-08-18 Thread paul1492
I know I've asked similar questions before but now I'm looking to use OSG to 
perform temporal averaging differently than I've asked before.

Is there a way to perform an update, cull and draw on only a sub part of 
the scene graph?

I want to average (say) 16 successive frames. For example,frames 1-16 should be 
average together and the final average being sent to the frame buffer. Same for 
frames 17-32, 33-48, etc. 

To do this, I assume I'll need 16 cameras all looking at the same scene 
graph. The first 15 would be rendering to a texture which is passed to the next 
camera while the last simply renders to frame buffer. Since I want to move 
the players slightly between each camera node, how would I do this? Normally, 
an update callback would be called on the entire scene graph but I'll have a 
shared scene graph so I don't think this will work.

Any words of advice?

Thanks,
Paul P.


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


[osg-users] Graphics Context Question

2010-09-20 Thread paul1492
I need to call glXWaitVideoSyncSGI() between the update and cull traversals. As 
I understand it, this needs to be called with a valid graphics context so I do 
viewer.getCamera()-getGraphicsContext()-makeCurrent() and then call 
glXWaitVideoSyncSGI() and then call the viewer.renderingTraversals(). However, 
the glXWaitVideoSyncSGI call is only working when I use a SingleThreading 
model. 
Otherwise, glXWaitVideoSyncSGI is returning with an error about a Bad Context. 
What am I doing wrong?

Paul P.



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


[osg-users] txp loader fix

2011-04-12 Thread paul1492
Let me post this to a more appropriate mailing list in hopes of getting a 
response. See below for e-mail.

Paul P.



- Forwarded Message 
From: Paul Palumbo paul1...@yahoo.com
To: osg-submissi...@lists.openscenegraph.org
Sent: Fri, April 8, 2011 8:58:36 AM
Subject: Re: [osg-submissions] txp loader fix


robertosfield wrote:
 Hi Nick,
 
 When I run osgviewer archive.txp I still have the warning emitted to
 the console:
 
 txp::ReaderWriterTXP::getArchive() error: archive id 1 not found: 
/archive.txp
 remove archive 1 size 0 result 1
 
 Any idea?
 Robert.
 

What is the status on this?  I get the same error message when I load a TXP 
file once I switched to 2.9.11.

Also, when I switched from 2.9.9 to 2.9.11 some TXP pages that are close to the 
FOV aren't being paged in unless I increase the LODScale. Has the Range to tile 
calculation (or LOD Scale) changed from 2.9.9 to 2.9.11?


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