[osg-users] Dilemma with the usage of object Shaders in differend views ...

2008-04-08 Thread hellhound
Hi folks,

actually i am working on object shading with OSG (i.e. Dot3). All works fine
with single views. Now i am using the osgViewer::Composite viewer and getting
some dielemma with the usage of object based shaders in differend views based
on the same scene graph.

I.e.: I've a single scene node with an object X where i bind the shaders (at 
the object StateSet) for execution. In a single view no problem. If i use this 
scene in 
multiple views (i.e. A, B) i've the dilemma, that i've to use diffrend shader 
params
on the same shader instance. In each rendering pass the params of the camera
are differend from the point of view of the views, if the views are rendered. 
But
the shader has no knowledge about this, it uses only a single uniform to hook 
bind
param ...

I've thought about the following sollutions:

1. Using for each view a single shader instance at the same object StateSet.
Is this usefull? If the scene is complex i could get a huge count of shaders
which have to be executed. Additionally i'm not sure, if the binding of the 
unused
shaders produces render artifacts or perfomance issues...

2. Using a callback mechanism which switches this values at the shader before 
   rendering

How i could achieve this aim in best way? Has anyone a better solution? 

Best regards,
Christian 



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


Re: [osg-users] nVidia card textures memory

2008-04-08 Thread Guy
I currently don't have the hardware to deal with it, so it was more a
theoretical question. Moreover, the second card doesn't have to be a
graphics card, so PBO has no meaning for it.

Anyway, since I know nothing about PBOs, I'll try to dig into it a
little, and if they are easier to map to PCIE address, I'll share this
knowledge. Same if one day I'll use multiple graphics card.

 

Thanks again,

 Guy.

 

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Monday, April 07, 2008 6:16 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] nVidia card textures memory

 

Hi Guy,

I don't know of any extensions for mapping/copying memory from one card
to another directly. NVidia will have such code in their drivers, but
its something that is hidden from the OpenGL.  

However, there are still OpenGL features that can help out a little.
First up Frame Buffer Objects are perfect for capturing images, the OSG
has full support for FBO's and its pretty straight forward to use just
by setting a single line in osg::Camera.  See osgdistortion or
osgprerender examples.  

Next up to copy the data from one card to another you'll need to  do a
read pixels, which ordinarily is pretty slow, so here it'd be best to
use Pixel Buffer Objects , agaiin its something the OSG supports, but so
far I've only ever used it for sending imagery to a graphics card.  You
will also need a second PBO to get the data to the second card.  I'm
afraid there isn't an OSG example showing how to do this part so you are
one your own.  If you get it all working then it'd be a nice OSG example
to have is you fancy contributing the final solution back.

Robert.

On Mon, Apr 7, 2008 at 3:20 PM, Guy [EMAIL PROTECTED] wrote:

Hello,

 First I know my question has nothing to do with OSG, but a lot of OSG
users might come across this subject and any guidance would be most
appreciated.

The questions I ask regard the nVidia textures memory and how to access
it.

 

1. I'd like to pass data from nVidia texture memory to other card, on
the PCI-Express bus. Is it possible and how to get Texture memory
address and to map it to PCIE address? Or if there is a possibility to
make the card render to memory address which is already mapped to PCIE
address?

 

2. I'd like to run some image processing code on the whole screen (no
matter what applications are running on and what they display). 

For that matter, I need to get the screen image, run my algorithm and
display the result full screen. 

The problems with that are:

2.1 After one frame that *I* draw, the next time I'll get the screen
image it might include changes *I* have done to the data. 

2.2 Getting the screen data is slow.

 

So the more complicate way to do it is to make all the applications
running, draw to an off-screen memory buffer, process that buffer and
display it.

Or plug-in image processing code, somewhere on the card, after the
driver drawing call functions and before the data it presented on
screen.

 

My questions are:

1. Is it possible to access the display buffer data on the nVidia card
just before it is displayed on screen? (plug-in my code)

2. Would setting the apps drawing to n'th nVidia virtual desktop to that
trick? And then again, does the nVidia card has address of memory buffer
for each n'th virtual desktop?

 

Thanks,

 Guy.

 


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

 

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


[osg-users] HDR with osg

2008-04-08 Thread Roman Grigoriev
Hi guys!

I try to implement HDR. And I got some problem when I compute average
luminance

I have to render it to 1X1 texture and here is the main problem 

When I setup viewport with setVewport(0,0,1,1) - I've got clearcolor i.e.
(1,0,0,0)

When I setup viewport with setVewport(0,0,2,2)  - I've got average luminance
- but here I've got 2X2 texture but I need 1X1 texture

What should I do?

Here is my source (luminance2 texture has size of 4X4)

osg::ref_ptrosg::Texture2D finalluminance = new osg::Texture2D;

 finalluminance-setTextureSize( 2, 2);



 finalluminance-setInternalFormat(GL_RGBA16F_ARB);

 finalluminance-setSourceFormat(GL_RGBA);

 finalluminance-setSourceType(GL_FLOAT);

 

 
finalluminance-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR)
;

 
finalluminance-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR)
;

   finalluminance-setWrap(osg::Texture::WRAP_S,
osg::Texture::CLAMP);

finalluminance-setWrap(osg::Texture::WRAP_T,
osg::Texture::CLAMP);

 

  osg::ref_ptrosg::Camera luminance3Camera = new osg::Camera;

osg::ref_ptrosg::Geode geode = new osg::Geode;

osg::ref_ptrosg::Geometry geom
=osg::createTexturedQuadGeometry(osg::Vec3(0,0,-1),osg::Vec3(1.0,0.0,-1.0),o
sg::Vec3(0.0,1.0,-1.0));

 
geom-getOrCreateStateSet()-setMode(GL_LIGHTING,osg::StateAttribute::OFF);

geode-addDrawable(geom.get());

luminance3Camera-setName(luminance3);

 
luminance3Camera-setClearColor(osg::Vec4f(1.0f,0.0f,0.0f,1.0f));

 
luminance3Camera-setProjectionMatrix(osg::Matrix::ortho2D(0,1,0,1));

 
luminance3Camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);

luminance3Camera-setViewMatrix(osg::Matrix::identity());

luminance3Camera-setViewport(0,0,2,2);

 
luminance3Camera-setRenderOrder(osg::Camera::POST_RENDER,13);

 
luminance3Camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OB
JECT);

 
luminance3Camera-attach(osg::Camera::COLOR_BUFFER,finalluminance.get());

luminance3Camera-addChild(geode.get());

 

osg::ref_ptrosg::StateSet luminance3stateset
=luminance3Camera-getOrCreateStateSet();

 
luminance3stateset-setTextureAttributeAndModes(0,luminance2.get(),osg::Stat
eAttribute::ON);

luminance3stateset-setAttribute(clamp,
osg::StateAttribute::ON);

 

root-addChild(luminance3Camera.get());

osg::Program* luminance3prg = new osg::Program;

luminance3stateset-setAttribute(luminance3prg);

 
luminance3prg-addShader(osg::Shader::readShaderFile(osg::Shader::VERTEX,
osgDB::findDataFile(Shaders/downLumExp_vp.glsl)));

 
luminance3prg-addShader(osg::Shader::readShaderFile(osg::Shader::FRAGMENT,
osgDB::findDataFile(Shaders/downLumExp.glsl)));

osg::Uniform* DownSampler = new
osg::Uniform(DownSampler,0);

luminance3stateset-addUniform(DownSampler);

 

here is downLumExp.glsl

 

/*FRAGMENT_SHADER*/

uniform sampler2D DownSampler;

const vec2 samples[16]={

-0.375, -0.375, -0.125, -0.375, 0.125, -0.375, 0.375, -0.375, -0.375,
-0.125, -0.125, -0.125, 0.125, -0.125, 0.375, -0.125, -0.375, 0.125, -0.125,
0.125, 0.125, 0.125, 0.375, 0.125, -0.375, 0.375, -0.125, 0.375, 0.125,
0.375, 0.375, 0.375

};

 

void main(void)

{

  float lum = 0.0;

float maximum = 0.0;

  vec4  color;

  vec2  sample;

  for(int i = 0; i  16; i++)

  {

sample = vec2(samples[i].x,samples[i].y);

color = texture2D(DownSampler, gl_TexCoord[0].xy + sample);


  maximum = max( maximum, color.g );

  lum += color.r;

  }

 

  lum *= 0.0625;

  lum = exp(lum);

  gl_FragColor = vec4(lum, maximum, 0.0, 1.0);

}

 

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


[osg-users] META_Object definition

2008-04-08 Thread Kim C Bale
Hi all,

 

I've started to inherit from some of the core osg classes to modify
their functionality and I noticed the use of this META_Object definition
in headers. Now I traced this back to its definition in osg::Object and
I just wanted to clarify its use. 

 

To give a bit of background I am currently inheriting from
osgParticle::ParticleSystem in order to override it's update function.
Am I right in thinking that the META_Object call is just a convenience
definition that define the set of copy operations? If so, does it need
to be included in the classes I create that inherit from the osg
library? 

 

Regards to you all,

 

Kim.

*
To view the terms under which this email is distributed, please go to 
http://www.hull.ac.uk/legal/email_disclaimer.html
*___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread Bo Jiang
  It seems that the header files in C++ standard do not need the .h postfix.
  In VS.NET 2005, you can open menu Tools-Options-Text Editor-File Extension, 
and choose the checkbox at right-bottom to solve this problem.
Good luck,
Bo Jiang
  - Original Message - 
  From: [EMAIL PROTECTED] 
  To: osg-users@lists.openscenegraph.org 
  Sent: Tuesday, April 08, 2008 7:54 PM
  Subject: [osg-users] why arent the .h postfix used in openscenegraph?


  why arent the .h postfix used in openscenegraph? Because of this i get no 
syntax highlighting in visual studio.net

   

  ERlend



--


  ___
  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] Problem with readPixels

2008-04-08 Thread Jean-Baptiste Authesserre
Hi,

Thank you for this quick answer.
I found two ways to do what I wanted :
-by adding the following line before the rendering loop (
while(!viewer-done())...):
viewer-getCamera()-attach(osg::Camera::COLOR_BUFFER, image);
So image is filled by a thread which has the graphics context current
Then the image is stored after the command viewer-frame() by using the
function  osgDB::writeImageFile(...).

-by using the method setPostDrawCallback  which is necessary if we want to
modify the rendered image before the storage.

Thanks a lot.

Jean-Baptiste

2008/4/1, Robert Osfield [EMAIL PROTECTED]:

 Hi Jean-Baptiste,

 The most likely cause of the OpenGL error is that your code that is
 calling glReadPixels doesn't have the graphics context current.  You
 have to call OpenGL from the thread that has the graphics context
 current. The easist way to do his is to attach a Camera post draw
 callback, this will be called from the appropriate graphics threads.
 If you are using 2.3.x or SVN then use Camera final draw calback as
 it's called later in the draw pipeline.

 Robert.


 On Tue, Apr 1, 2008 at 6:47 PM, Jean-Baptiste Authesserre
 [EMAIL PROTECTED] wrote:
  Hi everyone,
 
  I am trying to get screenshots of a generated scene with OSG. In order
 to do
  that I am using the method readPixels of the class osg::image. But it
 seems
  that the function glReadPixels used by readPixels fails. Here is a part
 of
  the code:
 
  //start the rendering
  float * depthBufferRaw;
  osg::Image * depthBuffer= new osg::Image();
  unsigned char * tmp;
 
  int height=1280;
  int width=1024;
  int i;
  depthBufferRaw = (float *) calloc(height*width, sizeof(float));
 
 
  while(!viewer-done())
  {
 
  viewer-frame();
 
  //Get values of the color buffer
  depthBuffer-readPixels(0,0,width,height,
  GL_LUMINANCE,GL_UNSIGNED_BYTE);
 
   tmp =  depthBuffer-data();
  for (i=0; iheight*width; i++)
  depthBufferRaw[i]=(float) tmp[i];
 
 //save as image
 ...
 
 
  }
 
  With the above code, i get an array (depthBufferRaw) with constant
 values
  whereas i see on my screen a scene with different objects and colors.
 Thanks
  to debug mode of VS2003, i can verify that depthBuffer-_data has been
  allocated.
 
  The source code of the osg::image method readPixels is the following:
 
  void Image::readPixels(int x,int y,int width,int height,GLenum
 format,GLenum
  type)
  {
  allocateImage(width,height,1,format,type);
 
  glPixelStorei(GL_PACK_ALIGNMENT,_packing);
 
  glReadPixels(x,y,width,height,format,type,_data);
  }
 
  So, it seems that glReadPixels failed. I tried to show this by using
  directly glReadPixels in my implementation with glGetError.
Strangely glGetError returns the value 1282 (GL_INVALID_OPERATION)
  whatever the position of the call to this function in my code. And when
 i
  tried to use this function in a loop as :
  while (errCode != GL_NO_ERROR)
 errCode = glGetError();
 
  I obtain an infinite loop.
 
  My questions are the following:
  -Is that possible to use glGetError with OSG?
  -Has anybody an idea of why the method readPixels fails in this case?
 
  Thanks in advance!
 
  Jean-Baptiste

  ___
   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] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread Jean-Sébastien Guay
Hi ERlend,

 why arent the .h postfix used in openscenegraph? Because of this i get 
 no syntax highlighting in visual studio.net

This is a philosophical choice, the motivations of which have been 
discussed to death so please search the archives.

To get syntax highlighting on the headers, see

http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio

Near the end of the page there is a section Extensionless headers and 
syntax highlighting on Visual Studio 7, 8 or 9. (just updated to remove 
references to the .reg files, which we don't distribute anymore)

To quote:

Go to Tools-Options, then Text Editor-File Extension, check Map 
Extensionless Files To at the bottom and select Microsoft Visual C++ 
in the list to the right.

There is also a text file called VisualStudio_Syntax_Highlighting.txt 
in the PlatformSpecifics\Windows directory of the OSG distribution that 
says basically the same thing.

Hope this helps,

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
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


Re: [osg-users] Two separated subgraphs, 2nd trial

2008-04-08 Thread Robert Osfield
Hi Oliver,

On Tue, Apr 8, 2008 at 1:13 PM, Oliver Kutter [EMAIL PROTECTED] wrote:

  Hi,

 isn't there anybody, who can answer my question (see below)?


I've just re-read you post and can't think of anything to say - as I really
don't know
what specifically is amiss.  I'd guess others don't know either.

Try providing a screen shot to tell us what looks wrong then we might be
able to help you.

Robert.



 regards
 Oliver

 Oliver Kutter schrieb:

 Hi guys,

 I have a question concerning the openscenegraph example osghud. I have a
 similar scene like this example except that I don't want to display hud
 text. Instead I want to render some small coordinate system axes like the
 ones in 3d studio max in the left bottom corner.

 I still use openscenegraph 1.2, but I think this is not important for my
 problem.

 Now my graph looks like this: I have a sceneview with a camera, a root
 node and the main scene as a child of the root node.
 Now I constructed my stuff like the osghud example: I added a new camera
 to the root node as a new subgraph and then I added my coordinates system
 axes model as a child to that camera so that the axes and the main scene
 are not connected.
 I set up the viewport of that camera (2nd viewport) to the left bottom
 corner with size (100,100) similar to 3d studio max. Finally, my axes are
 displayed in the 2nd viewport, but not in the main scene. That is correct so
 far.

 Now my problem is that not only the axes but also the main scene is
 displayed in the 2nd viewport. This shouldn't be like that because the main
 scene is not a child of the 2nd camera.

 What am I doing wrong?

 These are my parameters which I set to the camera:
 osg::ref_ptrosg::Node _axes =
 osgDB::readNodeFile(../data/osg/coordinate_axes.osg);

 _camera-setProjectionMatrix(osg::Matrix::perspective(50.0, 1, 0.1,
 1.0));
 _camera-setViewport(0,0,100,100);
 _camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
 _camera-setRenderOrder(osg::CameraNode::POST_RENDER);
 _camera-setClearMask(GL_DEPTH_BUFFER_BIT);

 _camera-addChild(_axes.get());
 _root-addChild(_camera.get());

 best regards,
 Oliver

 --

 ___
 osg-users mailing [EMAIL 
 PROTECTED]://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] Glenum pixelFormat

2008-04-08 Thread Vincent Bourdier
Hi All,

I'm trying to make a osg::Image, but in allocateImage(...) and setImage(...)
I need :

Pixel format,
Internal texture format,
AllocationMode...

But I didn't find any possible values ?!

Where can I find it ?

thanks

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


Re: [osg-users] Is it possible to extend OSG to support CGFX?

2008-04-08 Thread Jerome Hummel
Hi Robert,

 

Many thanks! I've found the link that answers my question.

If anybody is interested take a look at:

 
http://ati.amd.com/developer/rendermonkey/features.html#COLLADA_OpenGL_Effe
cts
http://ati.amd.com/developer/rendermonkey/features.html#COLLADA_OpenGL_Effec
ts



-Jerome

 

 

Date: Mon, 7 Apr 2008 17:08:47 +0100

From: Robert Osfield [EMAIL PROTECTED]

Subject: Re: [osg-users] Is it possible to extend OSG to support CGFX

  ?

To: OpenSceneGraph Users osg-users@lists.openscenegraph.org

Message-ID:

  [EMAIL PROTECTED]

Content-Type: text/plain; charset=iso-8859-1

 

Hi Jerome,

 

You'll need to extend the OSG to do this, but the OSG is designed to be

extensible so this needn't be a show stopper.

 

Avenues of investigation would be to look at osgNV project and the effects

support in Collada.  AMD/ATI recently release a viewer that renders effects

RenderMonkey via COLLADA as well.

 

Robert.

 

On Mon, Apr 7, 2008 at 4:49 PM, Jerome Hummel 

 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:

 

  Hi,

 

 

 

 I am currently evaluating OSG and am new to it so I apologize in advance

 if my question has a straightforward answer. I could not find any answer
in

 the osg archives.

 

 It seems osg currently support glsl shader but I would like to represent

 fixed function graphics state also in addition to shader parameters (just

 like cgfx does). So basically a simple converter to glsl wouldn't do the

 trick.

 

 I would like to be able to apply a CGFX shader (or DX FX Shader) on an osg

 scene. osgFX seems to add support for effects and techniques. Would this

 nodekit be the answer to my question ? How easy is it to add support for a

 new file format. Would I need to create a new node kit ?

 

 

 

 Thanks in advance,

 

 Regards,

 

 Jerome

 

 

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


Re: [osg-users] Shader question concerning GL_LIGHTING etc.

2008-04-08 Thread Jean-Sébastien Guay
Hi Yefei,

 Am I really reduced to modifying the core of OSG to add 
 uniforms and set their values whenever a relevant GL call is being 
 made? 

To add to what Mike and Leif said, you don't have to modify OSG. You 
could just write a visitor that does what you want, i.e. traverse the 
graph, checking for the state you need to set uniforms for, and then 
applying them. The same visitor could accumulate state from the root and 
when reaching a leaf node (geode), apply the right shader for the 
accumulated state.

With a bit of work you can get a solution that's pretty general and 
works well, and which is also pretty optimal.

Hope this helps,

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
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


Re: [osg-users] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread Robert Osfield
On Tue, Apr 8, 2008 at 12:54 PM, [EMAIL PROTECTED] wrote:

  why arent the .h postfix used in openscenegraph? Because of this i get
 no syntax highlighting in visual studio.net


The OpenSceneGraph is written in C++ rather than C so it uses Standard C++
style headers rather than C style headers.

I believe you can enable syntax high lighting in VS from the GUI, have a
look through the archives for details.

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


Re: [osg-users] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread erf
I figured out the syntax bit but arent .h c++ standard for include files??

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield
Sent: 8. april 2008 14:44
To: OpenSceneGraph Users
Subject: Re: [osg-users] why arent the .h postfix used in openscenegraph?

On Tue, Apr 8, 2008 at 12:54 PM, [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] 
wrote:

why arent the .h postfix used in openscenegraph? Because of this i get no 
syntax highlighting in visual studio.nethttp://studio.net

The OpenSceneGraph is written in C++ rather than C so it uses Standard C++ 
style headers rather than C style headers.

I believe you can enable syntax high lighting in VS from the GUI, have a look 
through the archives for details.

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


[osg-users] error while loading .3ds file

2008-04-08 Thread Sébastien Champmartin
Hi,
My problem is that when i try to load a 3ds file, i get the following message :
 
could not find plugin to read object from file ...3ds
 
I don't think that this is an error of coding because it worked with previous 
versions, 
visual studio said that it loaded the osgdb_3dsd.dll file.
can you tell me where to search ?
_
Avec Hotmail, vos e-mails vous suivent partout ! Mettez Hotmail sur votre 
mobile !
http://www.messengersurvotremobile.com/?d=hotmail___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] HDR with osg

2008-04-08 Thread J.P. Delport
Hi,

Roman Grigoriev wrote:
 Hi guys!
 
 I try to implement HDR. And I got some problem when I compute average 
 luminance
 
 I have to render it to 1X1 texture and here is the main problem
 
 When I setup viewport with setVewport(0,0,1,1) – I’ve got clearcolor 
 i.e. (1,0,0,0)
Is this for a 1x1 target, or for your 2x2 target? I guess your shader is 
not executed at all. What are you doing in the vertex shader? I have not 
tried 1x1 textures myself.

 
 When I setup viewport with setVewport(0,0,2,2)  - I’ve got average 
 luminance – but here I’ve got 2X2 texture but I need 1X1 texture
At some texture size (search gpgpu.org or experiment) it becomes faster 
to copy the texture to CPU and do final calculation there.

 
 What should I do?
Debug more :) See if your shader is executed for 1x1 case at all. Turn 
on more OSG (see OSG_NOTIFY_LEVEL) messages to see if there are not 
other problems, e.g. non-power of two texture resampling. Try texture 
rectangles...

jp

 
 Here is my source (luminance2 texture has size of 4X4)
 
 osg::ref_ptrosg::Texture2D finalluminance = new osg::Texture2D;
 
  finalluminance-setTextureSize( 2, 2);
 

 
  finalluminance-setInternalFormat(GL_RGBA16F_ARB);
 
  finalluminance-setSourceFormat(GL_RGBA);
 
  finalluminance-setSourceType(GL_FLOAT);
 
  
 
 
  finalluminance-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR);
 
 
  finalluminance-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR);
 
finalluminance-setWrap(osg::Texture::WRAP_S, 
 osg::Texture::CLAMP);
 
 finalluminance-setWrap(osg::Texture::WRAP_T, 
 osg::Texture::CLAMP);
 
  
 
   osg::ref_ptrosg::Camera luminance3Camera = new osg::Camera;
 
 osg::ref_ptrosg::Geode geode = new osg::Geode;
 
 osg::ref_ptrosg::Geometry geom 
 =osg::createTexturedQuadGeometry(osg::Vec3(0,0,-1),osg::Vec3(1.0,0.0,-1.0),osg::Vec3(0.0,1.0,-1.0));
 
 
 geom-getOrCreateStateSet()-setMode(GL_LIGHTING,osg::StateAttribute::OFF);
 
 geode-addDrawable(geom.get());
 
 luminance3Camera-setName(luminance3);
 
 
 luminance3Camera-setClearColor(osg::Vec4f(1.0f,0.0f,0.0f,1.0f));
 
 
 luminance3Camera-setProjectionMatrix(osg::Matrix::ortho2D(0,1,0,1));
 
 
 luminance3Camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
 
 luminance3Camera-setViewMatrix(osg::Matrix::identity());
 
 luminance3Camera-setViewport(0,0,2,2);
 
 
 luminance3Camera-setRenderOrder(osg::Camera::POST_RENDER,13);
 
 
 luminance3Camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
 
 
 luminance3Camera-attach(osg::Camera::COLOR_BUFFER,finalluminance.get());
 
 luminance3Camera-addChild(geode.get());
 
  
 
 osg::ref_ptrosg::StateSet luminance3stateset 
 =luminance3Camera-getOrCreateStateSet();
 
 
 luminance3stateset-setTextureAttributeAndModes(0,luminance2.get(),osg::StateAttribute::ON);
 
 luminance3stateset-setAttribute(clamp, 
 osg::StateAttribute::ON);
 
  
 
 root-addChild(luminance3Camera.get());
 
 osg::Program* luminance3prg = new osg::Program;
 
 luminance3stateset-setAttribute(luminance3prg);
 
 
 luminance3prg-addShader(osg::Shader::readShaderFile(osg::Shader::VERTEX, 
 osgDB::findDataFile(Shaders/downLumExp_vp.glsl)));
 
 
 luminance3prg-addShader(osg::Shader::readShaderFile(osg::Shader::FRAGMENT, 
 osgDB::findDataFile(Shaders/downLumExp.glsl)));
 
 osg::Uniform* DownSampler = new 
 osg::Uniform(DownSampler,0);
 
 luminance3stateset-addUniform(DownSampler);
 
  
 
 here is downLumExp.glsl
 
  
 
 /*FRAGMENT_SHADER*/
 
 uniform sampler2D DownSampler;
 
 const vec2 samples[16]={
 
 -0.375, -0.375, -0.125, -0.375, 0.125, -0.375, 0.375, -0.375, -0.375, 
 -0.125, -0.125, -0.125, 0.125, -0.125, 0.375, -0.125, -0.375, 0.125, 
 -0.125, 0.125, 0.125, 0.125, 0.375, 0.125, -0.375, 0.375, -0.125, 0.375, 
 0.125, 0.375, 0.375, 0.375
 
 };
 
  
 
 void main(void)
 
 {
 
   float lum = 0.0;
 
 float maximum = 0.0;
 
   vec4  color;
 
   vec2  sample;
 
   for(int i = 0; i  16; i++)
 
   {
 
 sample = vec2(samples[i].x,samples[i].y);
 
 color = texture2D(DownSampler, gl_TexCoord[0].xy + 
 sample);  
 
   maximum = max( maximum, color.g );
 
   lum += color.r;
 
   }
 
  
 
   lum *= 0.0625;
 
   lum = exp(lum);
 
   gl_FragColor = vec4(lum, maximum, 0.0, 1.0);
 
 }
 
  
 
 
 

Re: [osg-users] Glenum pixelFormat

2008-04-08 Thread Robert Osfield
Hi Vincent,

The format values are OpenGL enums.  For examples have a look at the plugins
that load osg::Images.

Robert.

On Tue, Apr 8, 2008 at 1:54 PM, Vincent Bourdier [EMAIL PROTECTED]
wrote:

 Hi All,

 I'm trying to make a osg::Image, but in allocateImage(...) and
 setImage(...) I need :

 Pixel format,
 Internal texture format,
 AllocationMode...

 But I didn't find any possible values ?!

 Where can I find it ?

 thanks

 Regards,
Vincent.

 ___
 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] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread Robert Osfield
On Tue, Apr 8, 2008 at 1:47 PM, [EMAIL PROTECTED] wrote:

  I figured out the syntax bit but arent .h c++ standard for include
 files??


Have you come across the Standard C++ headers at all yet?

.h are standard for C, but not C++.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread Jean-Sébastien Guay
Hi,

 I figured out the syntax bit but arent .h c++ standard for include files??

#include iostream
#include string
#include vector

#include osg/Geode

You can still use .h (I do, as do most others) but OSG elected to go the 
same route as the Standard C++ Library. See The C++ Programming 
Language by Bjarne Stroustrup for details.

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
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


Re: [osg-users] Quicktime plugin live streaming documentation/examples

2008-04-08 Thread Adrian Egli OpenSceneGraph (3D)
Hi
any demo / example ?

regards
2008/4/3, Mike Greene [EMAIL PROTECTED]:

 Colin,

Success! Using the later version of VDIG that you referenced, I was
 able to get a live stream to work with osgmovie.
 I'm using a KOCOM camera running video through a Canopus ADVC 110 A/D
 video convertor into a firewire cable.
 This is on Windows XP, OSG 2.3.5, Visual Studio 2005 debug, Quicktime
 SDK 7.3.


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




-- 

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


Re: [osg-users] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread erf
Allright.. I didn't know that was the standard, allways used and seen .h 
used. :)

Thanks for your answer.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Sébastien 
Guay
Sent: 8. april 2008 15:19
To: OpenSceneGraph Users
Subject: Re: [osg-users] why arent the .h postfix used in openscenegraph?

Hi,

 I figured out the syntax bit but arent .h c++ standard for include files??

#include iostream
#include string
#include vector

#include osg/Geode

You can still use .h (I do, as do most others) but OSG elected to go the
same route as the Standard C++ Library. See The C++ Programming
Language by Bjarne Stroustrup for details.

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
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] Two separated subgraphs, 2nd trial

2008-04-08 Thread Oliver Kutter

Hi,

ok, I made some screenshots, which I will explain in detail.

First I show you the structure of the graph. This is how I set up the graph:
http://getwww.uni-paderborn.de/~kutter/structure.jpg 
http://getwww.uni-paderborn.de/%7Ekutter/structure.jpg


As you can see, the camera and the coordinate system axes are in a 2nd 
subgraph.


Now, some screenshot from the application:

First, what you see in the main window is our lab with a robot at 
(0,0,0). The small viewport bottom left is the view from the 2nd camera.
http://getwww.uni-paderborn.de/~kutter/scene1.jpg 
http://getwww.uni-paderborn.de/%7Ekutter/scene1.jpg


As you can see in the next image, the coordinate system axes, which are 
a child of the 2nd camera, are not shown in the main viewport but in the 
viewport of the 2nd camera. But the main scene (lab with robot) is also 
shown in the 2nd viewport. I don't know why.
http://getwww.uni-paderborn.de/~kutter/scene2.jpg 
http://getwww.uni-paderborn.de/%7Ekutter/scene2.jpg


I used GL_DEPTH_BUFFER_BIT to ensure that the background of the 2nd 
viewport is not visible, so that the main scene is visible through the 
2nd viewport, as you can see here.
http://getwww.uni-paderborn.de/~kutter/scene3.jpg 
http://getwww.uni-paderborn.de/%7Ekutter/scene3.jpg


Now I want only the coordinate system axes to be shown in the 2nd viewport.

I hope you can help me now. And I hope you can see the images.

regards,
Oliver
http://getwww.uni-paderborn.de/%7Ekutter/scene1.jpg 
http://getwww.uni-paderborn.de/%7Ekutter/scene2.jpg 
http://getwww.uni-paderborn.de/%7Ekutter/scene3.jpg

http://getwww.uni-paderborn.de/%7Ekutter/structure.jpg

Robert Osfield schrieb:

Hi Oliver,

On Tue, Apr 8, 2008 at 1:13 PM, Oliver Kutter [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi,

isn't there anybody, who can answer my question (see below)?


I've just re-read you post and can't think of anything to say - as I 
really don't know

what specifically is amiss.  I'd guess others don't know either.

Try providing a screen shot to tell us what looks wrong then we might 
be able to help you.


Robert.
 



regards
Oliver

Oliver Kutter schrieb:

Hi guys,

I have a question concerning the openscenegraph example osghud.
I have a similar scene like this example except that I don't want
to display hud text. Instead I want to render some small
coordinate system axes like the ones in 3d studio max in the left
bottom corner.

I still use openscenegraph 1.2, but I think this is not important
for my problem.

Now my graph looks like this: I have a sceneview with a camera, a
root node and the main scene as a child of the root node.
Now I constructed my stuff like the osghud example: I added a new
camera to the root node as a new subgraph and then I added my
coordinates system axes model as a child to that camera so that
the axes and the main scene are not connected.
I set up the viewport of that camera (2nd viewport) to the left
bottom corner with size (100,100) similar to 3d studio max.
Finally, my axes are displayed in the 2nd viewport, but not in
the main scene. That is correct so far.

Now my problem is that not only the axes but also the main scene
is displayed in the 2nd viewport. This shouldn't be like that
because the main scene is not a child of the 2nd camera.

What am I doing wrong?

These are my parameters which I set to the camera:
osg::ref_ptrosg::Node _axes =
osgDB::readNodeFile(../data/osg/coordinate_axes.osg);

_camera-setProjectionMatrix(osg::Matrix::perspective(50.0, 1,
0.1, 1.0));
_camera-setViewport(0,0,100,100);
_camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
_camera-setRenderOrder(osg::CameraNode::POST_RENDER);
_camera-setClearMask(GL_DEPTH_BUFFER_BIT);

_camera-addChild(_axes.get());
_root-addChild(_camera.get());

best regards,
Oliver


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


___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread Robert Osfield
On Tue, Apr 8, 2008 at 2:31 PM, [EMAIL PROTECTED] wrote:

 Allright.. I didn't know that was the standard, allways used and seen .h
 used. :)


The problems with standards is that  their are jut so many to choose
from...  .h is most common for C++ simply from C heritage, but in the early
days of C++ loads of others sprung up in the absence of any clear definition
so .H, .hxx, .hpp and many other variants all turn up in the wild, there a
many of these convoluted variations none of which really make any sense once
you take a step back.  When Standard C++ finally made it out it didn't use
any of these convoluted attempts at something different from C's .h, rather
it just dropped the extension entirely.

Compilers just open files that are specified via #include without making any
assumptions, so you can use absolutely anything you want, you could use
.CPlusPlusHeaderFile  if you wished and it'll still compile.  Back in the
late nineties I made the choice about extensionless header for the OSG as it
aligns itself with what the Standard C++ headers convention, rather than
going for one of the many  .yetanotherabitaryc++headerextensions that were
proliferating at the time.

Back then I wouldn't have thought that it'd take more than a decade for
IDE's to automatically realise that an extension C++ header file is a C++
header file for all the sophistication of modern software some really
dumb arse things aren't possible...

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


Re: [osg-users] Two separated subgraphs, 2nd trial

2008-04-08 Thread Oliver Kutter

Hi Wojtek,

thanks for the hint. Our project supports camera views from the robots 
position. But the robots cameranodes are not placed directly beyond the 
root node, but as leaves of the graph. So I've implemented a function 
which does it automatically, and with all cameranodes. So that was the 
problem.


regards
Oliver

Wojciech Lewandowski schrieb:

Hi Oliver,
 
I have read your email. And, I too, have no idea what might be wrong. 
I bet its something beyond the code excerpt you had given. My 
only guess is that scene is somehow added to second camera. Do you 
clone this second hud camera from main camera maybe ? Could this be 
possible that you somehow added scene model into axes.osg ?
 
I am afraid I am unable to figure it out. Maybe you can post more 
lines of your code ?
 
Cheers,

Wojtek
 
 


- Original Message -
*From:* Oliver Kutter mailto:[EMAIL PROTECTED]
*To:* OpenSceneGraph Users
mailto:osg-users@lists.openscenegraph.org
*Sent:* Tuesday, April 08, 2008 3:53 PM
*Subject:* Re: [osg-users] Two separated subgraphs, 2nd trial

Hi,

ok, I made some screenshots, which I will explain in detail.

First I show you the structure of the graph. This is how I set up
the graph:
http://getwww.uni-paderborn.de/~kutter/structure.jpg
http://getwww.uni-paderborn.de/%7Ekutter/structure.jpg

As you can see, the camera and the coordinate system axes are in a
2nd subgraph.

Now, some screenshot from the application:

First, what you see in the main window is our lab with a robot at
(0,0,0). The small viewport bottom left is the view from the 2nd
camera.
http://getwww.uni-paderborn.de/~kutter/scene1.jpg
http://getwww.uni-paderborn.de/%7Ekutter/scene1.jpg

As you can see in the next image, the coordinate system axes,
which are a child of the 2nd camera, are not shown in the main
viewport but in the viewport of the 2nd camera. But the main scene
(lab with robot) is also shown in the 2nd viewport. I don't know why.
http://getwww.uni-paderborn.de/~kutter/scene2.jpg
http://getwww.uni-paderborn.de/%7Ekutter/scene2.jpg

I used GL_DEPTH_BUFFER_BIT to ensure that the background of the
2nd viewport is not visible, so that the main scene is visible
through the 2nd viewport, as you can see here.
http://getwww.uni-paderborn.de/~kutter/scene3.jpg
http://getwww.uni-paderborn.de/%7Ekutter/scene3.jpg

Now I want only the coordinate system axes to be shown in the 2nd
viewport.

I hope you can help me now. And I hope you can see the images.

regards,
Oliver



Robert Osfield schrieb:

Hi Oliver,

On Tue, Apr 8, 2008 at 1:13 PM, Oliver Kutter [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:

Hi,

isn't there anybody, who can answer my question (see below)?


I've just re-read you post and can't think of anything to say -
as I really don't know
what specifically is amiss.  I'd guess others don't know either.

Try providing a screen shot to tell us what looks wrong then we
might be able to help you.

Robert.
 



regards
Oliver

Oliver Kutter schrieb:

Hi guys,

I have a question concerning the openscenegraph example
osghud. I have a similar scene like this example except
that I don't want to display hud text. Instead I want to
render some small coordinate system axes like the ones in 3d
studio max in the left bottom corner.

I still use openscenegraph 1.2, but I think this is not
important for my problem.

Now my graph looks like this: I have a sceneview with a
camera, a root node and the main scene as a child of the
root node.
Now I constructed my stuff like the osghud example: I added
a new camera to the root node as a new subgraph and then I
added my coordinates system axes model as a child to that
camera so that the axes and the main scene are not connected.
I set up the viewport of that camera (2nd viewport) to the
left bottom corner with size (100,100) similar to 3d studio
max. Finally, my axes are displayed in the 2nd viewport, but
not in the main scene. That is correct so far.

Now my problem is that not only the axes but also the main
scene is displayed in the 2nd viewport. This shouldn't be
like that because the main scene is not a child of the 2nd
camera.

What am I doing wrong?

These are my parameters which I set to the camera:
osg::ref_ptrosg::Node _axes =
osgDB::readNodeFile(../data/osg/coordinate_axes.osg);

_camera-setProjectionMatrix(osg::Matrix::perspective(50.0,
1, 0.1, 1.0));
_camera-setViewport(0,0,100,100);
_camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
_camera-setRenderOrder(osg::CameraNode::POST_RENDER);
   

Re: [osg-users] Quicktime plugin live streaming documentation/examples

2008-04-08 Thread Colin Dunlop
Hi Adrian,

I've not documented anything on the wiki yet but below is how
the result was achieved on Windows XP. See my previous post for
any more detail. The demo/example is really just a quad with
your live feed playing - so a I've just tweaked osgmovie here
to force load the plug-in from a .live association and then
interpret the file basename to get a device and input ID -
ugly but working...

0. If you have NO QuickTime driver for your device then install
http://www.abstractplane.com/products/vdig.jsp
Use the latest version and do the manual install from the zip.
You will jave to live with the demo mode or fork out some $$$.
If your capture device has a QuickTime driver then you do not
need this VDIG for Windows thing eg BlackMagic Intensity Pro.

1. Modify the osgmovie.cpp and make sure that the .live
extension is associated with the osgdb_qt plugin:

osgDB::Registry::instance()-addFileExtensionAlias(live,qt);

2. run osgmovie --devices

 If you have any live feed devices associated with a QuickTime
 driver then this will spit out some command line options and
 associations.
 It will also spit out any pseudo Windows VDIG wrapped Direct
 Show devices in the same way

eg: ...
  4:1.liveBlackmagic HDTV 720Intensity HDTV 720p 59.94
 ...
  1:4.liveHauppauge WinTV 418 Video Capture
 (4E384A6E048F0)S-Video 3 UYVY @ 720x480

 ...

3. run osgmovie and pass it a pseudo file name that will be
translated by the plug-in to point at an input device eg
$ osgmovie x:y.live

This will force load the osgdb_qt plug-in, and then attempt to
decode the x:y.live where x and y are the input and channel of
your input - eg 5:0.live

I plan to submit to Robert an osgvideo example which wraps some
of this up a bit better.

Cheers,

Colin.


Adrian Egli OpenSceneGraph (3D) wrote:
 Hi
 any demo / example ?
 
 regards
 2008/4/3, Mike Greene [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:
 
 Colin,
 
Success! Using the later version of VDIG that you referenced, I was
 able to get a live stream to work with osgmovie.
 I'm using a KOCOM camera running video through a Canopus ADVC 110 A/D
 video convertor into a firewire cable.
 This is on Windows XP, OSG 2.3.5, Visual Studio 2005 debug, Quicktime
 SDK 7.3.
 
 
 Mike Greene
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 mailto:osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
 
 -- 
 
 Adrian Egli
 
 
 
 
 ___
 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] Dilemma with the usage of object Shaders in differend views ...

2008-04-08 Thread Guy
Hello,
 I think attaching a shader to each view instead of to object X would be
fine.
 If you want to use the callback I think you should create a pre-draw
callback to the object, which I'm not sure possible. The update
callbacks won't help you since it run on all the scene before the
rendering and then only the last setting of the shader will be set, and
it also might affect performance. So I still think attaching shaders to
the views would do what you want.

Guy.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, April 08, 2008 10:55 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Dilemma with the usage of object Shaders in
differend views ...

Hi folks,

actually i am working on object shading with OSG (i.e. Dot3). All works
fine
with single views. Now i am using the osgViewer::Composite viewer and
getting
some dielemma with the usage of object based shaders in differend views
based
on the same scene graph.

I.e.: I've a single scene node with an object X where i bind the shaders
(at 
the object StateSet) for execution. In a single view no problem. If i
use this scene in 
multiple views (i.e. A, B) i've the dilemma, that i've to use diffrend
shader params
on the same shader instance. In each rendering pass the params of the
camera
are differend from the point of view of the views, if the views are
rendered. But
the shader has no knowledge about this, it uses only a single uniform to
hook bind
param ...

I've thought about the following sollutions:

1. Using for each view a single shader instance at the same object
StateSet.
Is this usefull? If the scene is complex i could get a huge count of
shaders
which have to be executed. Additionally i'm not sure, if the binding of
the unused
shaders produces render artifacts or perfomance issues...

2. Using a callback mechanism which switches this values at the shader
before 
   rendering

How i could achieve this aim in best way? Has anyone a better solution? 

Best regards,
Christian 



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


Re: [osg-users] why arent the .h postfix used in openscenegraph? (UNCLASSIFIED)

2008-04-08 Thread Dorsett, Mike F AMRDEC/SAIC
Classification:  UNCLASSIFIED 
Caveats: NONE

 The problems with standards is that  their are jut so many to choose
from... 

What? That classic chesnut goes: 
The GREAT thing about standards is that there are so many to choose
from.

I should have sent this in OOXML format.

Mike Dorsett - Software Engineer - SAIC


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Tuesday, April 08, 2008 9:56 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] why arent the .h postfix used in
openscenegraph?

On Tue, Apr 8, 2008 at 2:31 PM, [EMAIL PROTECTED] wrote:


Allright.. I didn't know that was the standard, allways used and
seen .h used. :)




The problems with standards is that  their are jut so many to choose
from...  .h is most common for C++ simply from C heritage, but in the
early days of C++ loads of others sprung up in the absence of any clear
definition so .H, .hxx, .hpp and many other variants all turn up in the
wild, there a many of these convoluted variations none of which really
make any sense once you take a step back.  When Standard C++ finally
made it out it didn't use any of these convoluted attempts at something
different from C's .h, rather it just dropped the extension entirely.

Compilers just open files that are specified via #include without making
any assumptions, so you can use absolutely anything you want, you could
use .CPlusPlusHeaderFile  if you wished and it'll still compile.  Back
in the late nineties I made the choice about extensionless header for
the OSG as it aligns itself with what the Standard C++ headers
convention, rather than going for one of the many
.yetanotherabitaryc++headerextensions that were proliferating at the
time.  

Back then I wouldn't have thought that it'd take more than a decade for
IDE's to automatically realise that an extension C++ header file is a
C++ header file for all the sophistication of modern software some
really dumb arse things aren't possible...

Robert.


Classification:  UNCLASSIFIED 
Caveats: NONE

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


[osg-users] cessnafire particle setup

2008-04-08 Thread Gerrick Bivins
Hi ,
Does anyone happen to have the code (or settings) to
recreate the fire/smoke shown in cessnafire?
biv
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Two separated subgraphs, 2nd trial

2008-04-08 Thread Wojciech Lewandowski
Hi Oliver,

I have read your email. And, I too, have no idea what might be wrong. I bet its 
something beyond the code excerpt you had given. My only guess is that scene is 
somehow added to second camera. Do you clone this second hud camera from main 
camera maybe ? Could this be possible that you somehow added scene model into 
axes.osg ?

I am afraid I am unable to figure it out. Maybe you can post more lines of your 
code ?

Cheers,
Wojtek


  - Original Message - 
  From: Oliver Kutter 
  To: OpenSceneGraph Users 
  Sent: Tuesday, April 08, 2008 3:53 PM
  Subject: Re: [osg-users] Two separated subgraphs, 2nd trial


  Hi,

  ok, I made some screenshots, which I will explain in detail.

  First I show you the structure of the graph. This is how I set up the graph:
  http://getwww.uni-paderborn.de/~kutter/structure.jpg

  As you can see, the camera and the coordinate system axes are in a 2nd 
subgraph.

  Now, some screenshot from the application:

  First, what you see in the main window is our lab with a robot at (0,0,0). 
The small viewport bottom left is the view from the 2nd camera.
  http://getwww.uni-paderborn.de/~kutter/scene1.jpg

  As you can see in the next image, the coordinate system axes, which are a 
child of the 2nd camera, are not shown in the main viewport but in the viewport 
of the 2nd camera. But the main scene (lab with robot) is also shown in the 2nd 
viewport. I don't know why.
  http://getwww.uni-paderborn.de/~kutter/scene2.jpg

  I used GL_DEPTH_BUFFER_BIT to ensure that the background of the 2nd viewport 
is not visible, so that the main scene is visible through the 2nd viewport, as 
you can see here.
  http://getwww.uni-paderborn.de/~kutter/scene3.jpg

  Now I want only the coordinate system axes to be shown in the 2nd viewport.

  I hope you can help me now. And I hope you can see the images.

  regards, 
  Oliver



  Robert Osfield schrieb: 
Hi Oliver,


On Tue, Apr 8, 2008 at 1:13 PM, Oliver Kutter [EMAIL PROTECTED] wrote:

  Hi,

  isn't there anybody, who can answer my question (see below)?


I've just re-read you post and can't think of anything to say - as I really 
don't know
what specifically is amiss.  I'd guess others don't know either.

Try providing a screen shot to tell us what looks wrong then we might be 
able to help you.

Robert.
 

  regards
  Oliver

  Oliver Kutter schrieb: 
Hi guys,

I have a question concerning the openscenegraph example osghud. I 
have a similar scene like this example except that I don't want to display hud 
text. Instead I want to render some small coordinate system axes like the ones 
in 3d studio max in the left bottom corner.

I still use openscenegraph 1.2, but I think this is not important for 
my problem.

Now my graph looks like this: I have a sceneview with a camera, a root 
node and the main scene as a child of the root node.
Now I constructed my stuff like the osghud example: I added a new 
camera to the root node as a new subgraph and then I added my coordinates 
system axes model as a child to that camera so that the axes and the main scene 
are not connected.
I set up the viewport of that camera (2nd viewport) to the left bottom 
corner with size (100,100) similar to 3d studio max. Finally, my axes are 
displayed in the 2nd viewport, but not in the main scene. That is correct so 
far.

Now my problem is that not only the axes but also the main scene is 
displayed in the 2nd viewport. This shouldn't be like that because the main 
scene is not a child of the 2nd camera.

What am I doing wrong?

These are my parameters which I set to the camera:
osg::ref_ptrosg::Node _axes = 
osgDB::readNodeFile(../data/osg/coordinate_axes.osg);

_camera-setProjectionMatrix(osg::Matrix::perspective(50.0, 1, 0.1, 
1.0));
_camera-setViewport(0,0,100,100);
_camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
_camera-setRenderOrder(osg::CameraNode::POST_RENDER);
_camera-setClearMask(GL_DEPTH_BUFFER_BIT);

_camera-addChild(_axes.get());
_root-addChild(_camera.get());

best regards,
Oliver


___
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] HDR with osg

2008-04-08 Thread Guy
Hello.

1x1 texture should be rendered and call the shaders. I did it once in
multipass program that ran some algorithm on the GPU.
Be sure that you use orthographic projection and the viewport to be 1x1:

camera-setProjectionMatrixAsOrtho2D(0,1,0,1);
camera-setViewport(0, 0, 1, 1);

Guy.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of J.P.
Delport
Sent: Tuesday, April 08, 2008 3:11 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] HDR with osg

Hi,

Roman Grigoriev wrote:
 Hi guys!
 
 I try to implement HDR. And I got some problem when I compute average 
 luminance
 
 I have to render it to 1X1 texture and here is the main problem
 
 When I setup viewport with setVewport(0,0,1,1) - I've got clearcolor 
 i.e. (1,0,0,0)
Is this for a 1x1 target, or for your 2x2 target? I guess your shader is

not executed at all. What are you doing in the vertex shader? I have not

tried 1x1 textures myself.

 
 When I setup viewport with setVewport(0,0,2,2)  - I've got average 
 luminance - but here I've got 2X2 texture but I need 1X1 texture
At some texture size (search gpgpu.org or experiment) it becomes faster 
to copy the texture to CPU and do final calculation there.

 
 What should I do?
Debug more :) See if your shader is executed for 1x1 case at all. Turn 
on more OSG (see OSG_NOTIFY_LEVEL) messages to see if there are not 
other problems, e.g. non-power of two texture resampling. Try texture 
rectangles...

jp

 
 Here is my source (luminance2 texture has size of 4X4)
 
 osg::ref_ptrosg::Texture2D finalluminance = new osg::Texture2D;
 
  finalluminance-setTextureSize( 2, 2);
 

 
  finalluminance-setInternalFormat(GL_RGBA16F_ARB);
 
  finalluminance-setSourceFormat(GL_RGBA);
 
  finalluminance-setSourceType(GL_FLOAT);
 
  
 
 

finalluminance-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LIN
EAR);
 
 

finalluminance-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LIN
EAR);
 
finalluminance-setWrap(osg::Texture::WRAP_S, 
 osg::Texture::CLAMP);
 
 finalluminance-setWrap(osg::Texture::WRAP_T, 
 osg::Texture::CLAMP);
 
  
 
   osg::ref_ptrosg::Camera luminance3Camera = new osg::Camera;
 
 osg::ref_ptrosg::Geode geode = new osg::Geode;
 
 osg::ref_ptrosg::Geometry geom 

=osg::createTexturedQuadGeometry(osg::Vec3(0,0,-1),osg::Vec3(1.0,0.0,-1.
0),osg::Vec3(0.0,1.0,-1.0));
 
 

geom-getOrCreateStateSet()-setMode(GL_LIGHTING,osg::StateAttribute::OF
F);
 
 geode-addDrawable(geom.get());
 
 luminance3Camera-setName(luminance3);
 
 
 luminance3Camera-setClearColor(osg::Vec4f(1.0f,0.0f,0.0f,1.0f));
 
 
 luminance3Camera-setProjectionMatrix(osg::Matrix::ortho2D(0,1,0,1));
 
 
 luminance3Camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
 

luminance3Camera-setViewMatrix(osg::Matrix::identity());
 
 luminance3Camera-setViewport(0,0,2,2);
 
 
 luminance3Camera-setRenderOrder(osg::Camera::POST_RENDER,13);
 
 

luminance3Camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFE
R_OBJECT);
 
 

luminance3Camera-attach(osg::Camera::COLOR_BUFFER,finalluminance.get())
;
 
 luminance3Camera-addChild(geode.get());
 
  
 
 osg::ref_ptrosg::StateSet luminance3stateset 
 =luminance3Camera-getOrCreateStateSet();
 
 

luminance3stateset-setTextureAttributeAndModes(0,luminance2.get(),osg::
StateAttribute::ON);
 
 luminance3stateset-setAttribute(clamp, 
 osg::StateAttribute::ON);
 
  
 
 root-addChild(luminance3Camera.get());
 
 osg::Program* luminance3prg = new
osg::Program;
 

luminance3stateset-setAttribute(luminance3prg);
 
 

luminance3prg-addShader(osg::Shader::readShaderFile(osg::Shader::VERTEX
, 
 osgDB::findDataFile(Shaders/downLumExp_vp.glsl)));
 
 

luminance3prg-addShader(osg::Shader::readShaderFile(osg::Shader::FRAGME
NT, 
 osgDB::findDataFile(Shaders/downLumExp.glsl)));
 
 osg::Uniform* DownSampler = new 
 osg::Uniform(DownSampler,0);
 
 luminance3stateset-addUniform(DownSampler);
 
  
 
 here is downLumExp.glsl
 
  
 
 /*FRAGMENT_SHADER*/
 
 uniform sampler2D DownSampler;
 
 const vec2 samples[16]={
 
 -0.375, -0.375, -0.125, -0.375, 0.125, -0.375, 0.375, -0.375, -0.375, 
 -0.125, -0.125, -0.125, 0.125, -0.125, 0.375, -0.125, -0.375, 0.125, 
 -0.125, 0.125, 0.125, 0.125, 0.375, 0.125, -0.375, 0.375, -0.125,
0.375, 
 0.125, 0.375, 0.375, 0.375
 
 };
 
  
 
 void main(void)
 
 {
 
   float lum = 0.0;
 
 float maximum = 0.0;
 
   vec4  color;
 
   vec2  sample;
 
   for(int i = 0; i  16; i++)
 
  

Re: [osg-users] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread erf
Thanks for your elaborated insight on the history of headers! :) Btw. I guess 
you meant extentionless at the end? :)

Erlend

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield
Sent: 8. april 2008 16:56
To: OpenSceneGraph Users
Subject: Re: [osg-users] why arent the .h postfix used in openscenegraph?

On Tue, Apr 8, 2008 at 2:31 PM, [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] 
wrote:
Allright.. I didn't know that was the standard, allways used and seen .h 
used. :)

The problems with standards is that  their are jut so many to choose from...  
.h is most common for C++ simply from C heritage, but in the early days of C++ 
loads of others sprung up in the absence of any clear definition so .H, .hxx, 
.hpp and many other variants all turn up in the wild, there a many of these 
convoluted variations none of which really make any sense once you take a step 
back.  When Standard C++ finally made it out it didn't use any of these 
convoluted attempts at something different from C's .h, rather it just dropped 
the extension entirely.

Compilers just open files that are specified via #include without making any 
assumptions, so you can use absolutely anything you want, you could use 
.CPlusPlusHeaderFile  if you wished and it'll still compile.  Back in the late 
nineties I made the choice about extensionless header for the OSG as it aligns 
itself with what the Standard C++ headers convention, rather than going for one 
of the many  .yetanotherabitaryc++headerextensions that were proliferating at 
the time.

Back then I wouldn't have thought that it'd take more than a decade for IDE's 
to automatically realise that an extension C++ header file is a C++ header 
file for all the sophistication of modern software some really dumb arse 
things aren't possible...

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


Re: [osg-users] Two separated subgraphs, 2nd trial

2008-04-08 Thread Guy
Maybe you could send your whole file. The code you inlined here seem
right.

Guy.

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Tuesday, April 08, 2008 2:51 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Two separated subgraphs, 2nd trial

 

Hi Oliver,

On Tue, Apr 8, 2008 at 1:13 PM, Oliver Kutter [EMAIL PROTECTED] wrote:

Hi,

isn't there anybody, who can answer my question (see below)?


I've just re-read you post and can't think of anything to say - as I
really don't know
what specifically is amiss.  I'd guess others don't know either.

Try providing a screen shot to tell us what looks wrong then we might be
able to help you.

Robert.
 


regards
Oliver

Oliver Kutter schrieb: 

Hi guys,

I have a question concerning the openscenegraph example
osghud. I have a similar scene like this example except that I don't
want to display hud text. Instead I want to render some small coordinate
system axes like the ones in 3d studio max in the left bottom corner.

I still use openscenegraph 1.2, but I think this is not
important for my problem.

Now my graph looks like this: I have a sceneview with a camera,
a root node and the main scene as a child of the root node.
Now I constructed my stuff like the osghud example: I added a
new camera to the root node as a new subgraph and then I added my
coordinates system axes model as a child to that camera so that the axes
and the main scene are not connected.
I set up the viewport of that camera (2nd viewport) to the left
bottom corner with size (100,100) similar to 3d studio max. Finally, my
axes are displayed in the 2nd viewport, but not in the main scene. That
is correct so far.

Now my problem is that not only the axes but also the main scene
is displayed in the 2nd viewport. This shouldn't be like that because
the main scene is not a child of the 2nd camera.

What am I doing wrong?

These are my parameters which I set to the camera:
osg::ref_ptrosg::Node _axes =
osgDB::readNodeFile(../data/osg/coordinate_axes.osg);

_camera-setProjectionMatrix(osg::Matrix::perspective(50.0, 1,
0.1, 1.0));
_camera-setViewport(0,0,100,100);
_camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
_camera-setRenderOrder(osg::CameraNode::POST_RENDER);
_camera-setClearMask(GL_DEPTH_BUFFER_BIT);

_camera-addChild(_axes.get());
_root-addChild(_camera.get());

best regards,
Oliver








 
___
osg-users mailing list
osg-users@lists.openscenegraph.org

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


___
osg-users mailing list
osg-users@lists.openscenegraph.org

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

 

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


Re: [osg-users] Dilemma with the usage of object Shaders in differend views ...

2008-04-08 Thread Christian Heine
Hello Guy,

I think attaching a shader to each view instead of to object X would be
fine.

I'm not sure if this may be the right thing. Correct me if I'm wrong but 
this causes
in some other issues:

1. I lost the reference to the specifiv object states like Textures, 
Geometries etc. How
does the shader should access this values by differend objects?

2. If i bind it to the view, each object is rendered with this shader. 
So i shouldn't have
the ability to separate shaders and effects between objects ...

If you want to use the callback I think you should create a pre-draw
callback to the object, which I'm not sure possible. The update
callbacks won't help you since it run on all the scene before the
rendering and then only the last setting of the shader will be set, and
it also might affect performance. So I still think attaching shaders to
the views would do what you want.

Ok, this is an argument i've to agree. But if If i overload the render 
method of the
composite viewer i could implement callbacks (better update sequences) 
for each
object before calling the parent rendering method, so this should be 
possible. But i
am not sure about possible perfomance lacks ...

Best regards,
Chrsitian



Guy wrote:
 Hello,
  I think attaching a shader to each view instead of to object X would be
 fine.
  If you want to use the callback I think you should create a pre-draw
 callback to the object, which I'm not sure possible. The update
 callbacks won't help you since it run on all the scene before the
 rendering and then only the last setting of the shader will be set, and
 it also might affect performance. So I still think attaching shaders to
 the views would do what you want.

 Guy.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Tuesday, April 08, 2008 10:55 AM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] Dilemma with the usage of object Shaders in
 differend views ...

 Hi folks,

 actually i am working on object shading with OSG (i.e. Dot3). All works
 fine
 with single views. Now i am using the osgViewer::Composite viewer and
 getting
 some dielemma with the usage of object based shaders in differend views
 based
 on the same scene graph.

 I.e.: I've a single scene node with an object X where i bind the shaders
 (at 
 the object StateSet) for execution. In a single view no problem. If i
 use this scene in 
 multiple views (i.e. A, B) i've the dilemma, that i've to use diffrend
 shader params
 on the same shader instance. In each rendering pass the params of the
 camera
 are differend from the point of view of the views, if the views are
 rendered. But
 the shader has no knowledge about this, it uses only a single uniform to
 hook bind
 param ...

 I've thought about the following sollutions:

 1. Using for each view a single shader instance at the same object
 StateSet.
 Is this usefull? If the scene is complex i could get a huge count of
 shaders
 which have to be executed. Additionally i'm not sure, if the binding of
 the unused
 shaders produces render artifacts or perfomance issues...

 2. Using a callback mechanism which switches this values at the shader
 before 
rendering

 How i could achieve this aim in best way? Has anyone a better solution? 

 Best regards,
 Christian 



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
 g
 ___
 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] Two separated subgraphs, 2nd trial

2008-04-08 Thread Oliver Kutter

Hi Guy,

everything is fine, I found the error. I already mentioned in a previous 
email.


thanks,
Oliver

Guy schrieb:


Maybe you could send your whole file. The code you inlined here seem 
right.


Guy.

 




*From:* [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] *On Behalf Of 
*Robert Osfield

*Sent:* Tuesday, April 08, 2008 2:51 PM
*To:* OpenSceneGraph Users
*Subject:* Re: [osg-users] Two separated subgraphs, 2nd trial

 


Hi Oliver,

On Tue, Apr 8, 2008 at 1:13 PM, Oliver Kutter [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi,

isn't there anybody, who can answer my question (see below)?


I've just re-read you post and can't think of anything to say - as I 
really don't know

what specifically is amiss.  I'd guess others don't know either.

Try providing a screen shot to tell us what looks wrong then we might 
be able to help you.


Robert.
 



regards
Oliver

Oliver Kutter schrieb:

Hi guys,

I have a question concerning the openscenegraph example osghud.
I have a similar scene like this example except that I don't want
to display hud text. Instead I want to render some small
coordinate system axes like the ones in 3d studio max in the left
bottom corner.

I still use openscenegraph 1.2, but I think this is not important
for my problem.

Now my graph looks like this: I have a sceneview with a camera, a
root node and the main scene as a child of the root node.
Now I constructed my stuff like the osghud example: I added a new
camera to the root node as a new subgraph and then I added my
coordinates system axes model as a child to that camera so that
the axes and the main scene are not connected.
I set up the viewport of that camera (2nd viewport) to the left
bottom corner with size (100,100) similar to 3d studio max.
Finally, my axes are displayed in the 2nd viewport, but not in the
main scene. That is correct so far.

Now my problem is that not only the axes but also the main scene
is displayed in the 2nd viewport. This shouldn't be like that
because the main scene is not a child of the 2nd camera.

What am I doing wrong?

These are my parameters which I set to the camera:
osg::ref_ptrosg::Node _axes =
osgDB::readNodeFile(../data/osg/coordinate_axes.osg);

_camera-setProjectionMatrix(osg::Matrix::perspective(50.0, 1,
0.1, 1.0));
_camera-setViewport(0,0,100,100);
_camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
_camera-setRenderOrder(osg::CameraNode::POST_RENDER);
_camera-setClearMask(GL_DEPTH_BUFFER_BIT);

_camera-addChild(_axes.get());
_root-addChild(_camera.get());

best regards,
Oliver






 


___

osg-users mailing list

osg-users@lists.openscenegraph.org 
mailto:osg-users@lists.openscenegraph.org

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

  



___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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] Glenum pixelFormat

2008-04-08 Thread Guy
Here is what I've found in gl.h:

 

 

 

/* PixelFormat */

#define GL_COLOR_INDEX0x1900

#define GL_STENCIL_INDEX  0x1901

#define GL_DEPTH_COMPONENT0x1902

#define GL_RED0x1903

#define GL_GREEN  0x1904

#define GL_BLUE   0x1905

#define GL_ALPHA  0x1906

#define GL_RGB0x1907

#define GL_RGBA   0x1908

#define GL_LUMINANCE  0x1909

#define GL_LUMINANCE_ALPHA0x190A

 

/* texture */

#define GL_ALPHA4 0x803B

#define GL_ALPHA8 0x803C

#define GL_ALPHA120x803D

#define GL_ALPHA160x803E

#define GL_LUMINANCE4 0x803F

#define GL_LUMINANCE8 0x8040

#define GL_LUMINANCE120x8041

#define GL_LUMINANCE160x8042

#define GL_LUMINANCE4_ALPHA4  0x8043

#define GL_LUMINANCE6_ALPHA2  0x8044

#define GL_LUMINANCE8_ALPHA8  0x8045

#define GL_LUMINANCE12_ALPHA4 0x8046

#define GL_LUMINANCE12_ALPHA120x8047

#define GL_LUMINANCE16_ALPHA160x8048

#define GL_INTENSITY  0x8049

#define GL_INTENSITY4 0x804A

#define GL_INTENSITY8 0x804B

#define GL_INTENSITY120x804C

#define GL_INTENSITY160x804D

#define GL_R3_G3_B2   0x2A10

#define GL_RGB4   0x804F

#define GL_RGB5   0x8050

#define GL_RGB8   0x8051

#define GL_RGB10  0x8052

#define GL_RGB12  0x8053

#define GL_RGB16  0x8054

#define GL_RGBA2  0x8055

#define GL_RGBA4  0x8056

#define GL_RGB5_A10x8057

#define GL_RGBA8  0x8058

#define GL_RGB10_A2   0x8059

#define GL_RGBA12 0x805A

#define GL_RGBA16 0x805B

#define GL_TEXTURE_RED_SIZE   0x805C

#define GL_TEXTURE_GREEN_SIZE 0x805D

#define GL_TEXTURE_BLUE_SIZE  0x805E

#define GL_TEXTURE_ALPHA_SIZE 0x805F

#define GL_TEXTURE_LUMINANCE_SIZE 0x8060

#define GL_TEXTURE_INTENSITY_SIZE 0x8061

#define GL_PROXY_TEXTURE_1D   0x8063

#define GL_PROXY_TEXTURE_2D   0x8064

 

For internal texture format there are also definitions in osg/Texture

 

In osg/Image:

 

enum AllocationMode {

NO_DELETE,

USE_NEW_DELETE,

USE_MALLOC_FREE

};

 

Good luck,

 Guy.



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Vincent
Bourdier
Sent: Tuesday, April 08, 2008 2:55 PM
To: osg
Subject: [osg-users] Glenum pixelFormat

 

Hi All,

I'm trying to make a osg::Image, but in allocateImage(...) and
setImage(...) I need :

Pixel format, 
Internal texture format, 
AllocationMode...

But I didn't find any possible values ?!

Where can I find it ?

thanks

Regards,
   Vincent.

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


Re: [osg-users] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread Paul Martz
Oh no! The header file extension discussion, _again_? :-) Well, I sat out of
it last time, so I'll throw my greatly-devalued US$0.02 into the fray this
time...

.h are standard for C, but not C++. 

Arguably, a mistake in the genesis of C++. Stroustrup has publicly stated
his concise definition of C++ as C with classes. Using such a definition,
there was no need for C++ to redefine header file extensions; no such change
was necessary to merely add classes to C.
 
As others have stated, the compiler doesn't care about the header extension
and enforces no standard extension. Therefore, those of us in OSG can do
whatever we want. Indeed, the osgPlugins routinely use a .h extension for
their header files. The absence of an extension creates problems for code
editors that present non-intuitive interfaces for controlling syntax
highlighting. Appending .h to OSG headers would eliminate this confusion.
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com http://www.skew-matrix.com/ 
+1 303 859 9466
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] cessnafire particle setup

2008-04-08 Thread Guy
These files contain the fire and the smoke trail.

Good luck,
 Guy.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gerrick
Bivins
Sent: Tuesday, April 08, 2008 5:00 PM
To: OpenSceneGraph Users
Subject: [osg-users] cessnafire particle setup

Hi ,
Does anyone happen to have the code (or settings) to
recreate the fire/smoke shown in cessnafire?
biv
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g


fire.osg
Description: fire.osg


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


Re: [osg-users] Glenum pixelFormat

2008-04-08 Thread Vincent Bourdier
Thanks Guy

I've looked at gl.h too to find that.

Thanks a lot.

Regard.
   Vincent.

2008/4/8, Guy [EMAIL PROTECTED]:

  Here is what I've found in gl.h:







 /* PixelFormat */

 #define GL_COLOR_INDEX0x1900

 #define GL_STENCIL_INDEX  0x1901

 #define GL_DEPTH_COMPONENT0x1902

 #define GL_RED0x1903

 #define GL_GREEN  0x1904

 #define GL_BLUE   0x1905

 #define GL_ALPHA  0x1906

 #define GL_RGB0x1907

 #define GL_RGBA   0x1908

 #define GL_LUMINANCE  0x1909

 #define GL_LUMINANCE_ALPHA0x190A



 /* texture */

 #define GL_ALPHA4 0x803B

 #define GL_ALPHA8 0x803C

 #define GL_ALPHA120x803D

 #define GL_ALPHA160x803E

 #define GL_LUMINANCE4 0x803F

 #define GL_LUMINANCE8 0x8040

 #define GL_LUMINANCE120x8041

 #define GL_LUMINANCE160x8042

 #define GL_LUMINANCE4_ALPHA4  0x8043

 #define GL_LUMINANCE6_ALPHA2  0x8044

 #define GL_LUMINANCE8_ALPHA8  0x8045

 #define GL_LUMINANCE12_ALPHA4 0x8046

 #define GL_LUMINANCE12_ALPHA120x8047

 #define GL_LUMINANCE16_ALPHA160x8048

 #define GL_INTENSITY  0x8049

 #define GL_INTENSITY4 0x804A

 #define GL_INTENSITY8 0x804B

 #define GL_INTENSITY120x804C

 #define GL_INTENSITY160x804D

 #define GL_R3_G3_B2   0x2A10

 #define GL_RGB4   0x804F

 #define GL_RGB5   0x8050

 #define GL_RGB8   0x8051

 #define GL_RGB10  0x8052

 #define GL_RGB12  0x8053

 #define GL_RGB16  0x8054

 #define GL_RGBA2  0x8055

 #define GL_RGBA4  0x8056

 #define GL_RGB5_A10x8057

 #define GL_RGBA8  0x8058

 #define GL_RGB10_A2   0x8059

 #define GL_RGBA12 0x805A

 #define GL_RGBA16 0x805B

 #define GL_TEXTURE_RED_SIZE   0x805C

 #define GL_TEXTURE_GREEN_SIZE 0x805D

 #define GL_TEXTURE_BLUE_SIZE  0x805E

 #define GL_TEXTURE_ALPHA_SIZE 0x805F

 #define GL_TEXTURE_LUMINANCE_SIZE 0x8060

 #define GL_TEXTURE_INTENSITY_SIZE 0x8061

 #define GL_PROXY_TEXTURE_1D   0x8063

 #define GL_PROXY_TEXTURE_2D   0x8064



 For internal texture format there are also definitions in osg/Texture



 In osg/Image:



 enum AllocationMode {

 NO_DELETE,

 USE_NEW_DELETE,

 USE_MALLOC_FREE

 };



 Good luck,

  Guy.
  --

 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *Vincent
 Bourdier
 *Sent:* Tuesday, April 08, 2008 2:55 PM
 *To:* osg
 *Subject:* [osg-users] Glenum pixelFormat



 Hi All,

 I'm trying to make a osg::Image, but in allocateImage(...) and
 setImage(...) I need :

 Pixel format,
 Internal texture format,
 AllocationMode...

 But I didn't find any possible values ?!

 Where can I find it ?

 thanks

 Regards,
Vincent.

 ___
 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] Dilemma with the usage of object Shaders in differend views ...

2008-04-08 Thread Guy
Well, the shader doesn't know of the stateset of the object (textures
attached) if you don't set it explicitly. Otherwise, the shader can be
inherited and at ObjectX you can add a uniform for the sampler.

You are right that all the objects will be rendered with the same
shader.

If you set different shader for each object, I would like some
clarification about your original question.
Do you want different shader per object but with some common features
that are different for each view??
If so, keep the shader as they were (differently setted) on the objects
in the single view. Add to all the shaders uniforms for the View
properties, and set the uniforms values differently at each View node.

Hope it helps,
 Guy.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christian Heine
Sent: Tuesday, April 08, 2008 5:39 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Dilemma with the usage of object Shaders in
differend views ...

Hello Guy,

I think attaching a shader to each view instead of to object X would be
fine.

I'm not sure if this may be the right thing. Correct me if I'm wrong but

this causes
in some other issues:

1. I lost the reference to the specifiv object states like Textures, 
Geometries etc. How
does the shader should access this values by differend objects?

2. If i bind it to the view, each object is rendered with this shader. 
So i shouldn't have
the ability to separate shaders and effects between objects ...

If you want to use the callback I think you should create a pre-draw
callback to the object, which I'm not sure possible. The update
callbacks won't help you since it run on all the scene before the
rendering and then only the last setting of the shader will be set, and
it also might affect performance. So I still think attaching shaders to
the views would do what you want.

Ok, this is an argument i've to agree. But if If i overload the render 
method of the
composite viewer i could implement callbacks (better update sequences)

for each
object before calling the parent rendering method, so this should be 
possible. But i
am not sure about possible perfomance lacks ...

Best regards,
Chrsitian



Guy wrote:
 Hello,
  I think attaching a shader to each view instead of to object X would
be
 fine.
  If you want to use the callback I think you should create a pre-draw
 callback to the object, which I'm not sure possible. The update
 callbacks won't help you since it run on all the scene before the
 rendering and then only the last setting of the shader will be set,
and
 it also might affect performance. So I still think attaching shaders
to
 the views would do what you want.

 Guy.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Tuesday, April 08, 2008 10:55 AM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] Dilemma with the usage of object Shaders in
 differend views ...

 Hi folks,

 actually i am working on object shading with OSG (i.e. Dot3). All
works
 fine
 with single views. Now i am using the osgViewer::Composite viewer and
 getting
 some dielemma with the usage of object based shaders in differend
views
 based
 on the same scene graph.

 I.e.: I've a single scene node with an object X where i bind the
shaders
 (at 
 the object StateSet) for execution. In a single view no problem. If i
 use this scene in 
 multiple views (i.e. A, B) i've the dilemma, that i've to use diffrend
 shader params
 on the same shader instance. In each rendering pass the params of the
 camera
 are differend from the point of view of the views, if the views are
 rendered. But
 the shader has no knowledge about this, it uses only a single uniform
to
 hook bind
 param ...

 I've thought about the following sollutions:

 1. Using for each view a single shader instance at the same object
 StateSet.
 Is this usefull? If the scene is complex i could get a huge count of
 shaders
 which have to be executed. Additionally i'm not sure, if the binding
of
 the unused
 shaders produces render artifacts or perfomance issues...

 2. Using a callback mechanism which switches this values at the shader
 before 
rendering

 How i could achieve this aim in best way? Has anyone a better
solution? 

 Best regards,
 Christian 



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

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

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

   

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

Re: [osg-users] Two separated subgraphs, 2nd trial

2008-04-08 Thread Guy
Yes, I've noticed too late...

Sorry.

 Guy.

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Oliver
Kutter
Sent: Tuesday, April 08, 2008 5:48 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Two separated subgraphs, 2nd trial

 

Hi Guy,

everything is fine, I found the error. I already mentioned in a previous
email.

thanks, 
Oliver

Guy schrieb: 

Maybe you could send your whole file. The code you inlined here seem
right.

Guy.

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Tuesday, April 08, 2008 2:51 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Two separated subgraphs, 2nd trial

 

Hi Oliver,

On Tue, Apr 8, 2008 at 1:13 PM, Oliver Kutter [EMAIL PROTECTED] wrote:

Hi,

isn't there anybody, who can answer my question (see below)?


I've just re-read you post and can't think of anything to say - as I
really don't know
what specifically is amiss.  I'd guess others don't know either.

Try providing a screen shot to tell us what looks wrong then we might be
able to help you.

Robert.
 


regards
Oliver

Oliver Kutter schrieb: 

Hi guys,

I have a question concerning the openscenegraph example
osghud. I have a similar scene like this example except that I don't
want to display hud text. Instead I want to render some small coordinate
system axes like the ones in 3d studio max in the left bottom corner.

I still use openscenegraph 1.2, but I think this is not
important for my problem.

Now my graph looks like this: I have a sceneview with a camera,
a root node and the main scene as a child of the root node.
Now I constructed my stuff like the osghud example: I added a
new camera to the root node as a new subgraph and then I added my
coordinates system axes model as a child to that camera so that the axes
and the main scene are not connected.
I set up the viewport of that camera (2nd viewport) to the left
bottom corner with size (100,100) similar to 3d studio max. Finally, my
axes are displayed in the 2nd viewport, but not in the main scene. That
is correct so far.

Now my problem is that not only the axes but also the main scene
is displayed in the 2nd viewport. This shouldn't be like that because
the main scene is not a child of the 2nd camera.

What am I doing wrong?

These are my parameters which I set to the camera:
osg::ref_ptrosg::Node _axes =
osgDB::readNodeFile(../data/osg/coordinate_axes.osg);

_camera-setProjectionMatrix(osg::Matrix::perspective(50.0, 1,
0.1, 1.0));
_camera-setViewport(0,0,100,100);
_camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
_camera-setRenderOrder(osg::CameraNode::POST_RENDER);
_camera-setClearMask(GL_DEPTH_BUFFER_BIT);

_camera-addChild(_axes.get());
_root-addChild(_camera.get());

best regards,
Oliver

 
 







 
 
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org

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


___
osg-users mailing list
osg-users@lists.openscenegraph.org

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

 

 







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


Re: [osg-users] Shader question concerning GL_LIGHTING etc.

2008-04-08 Thread Yefei He
Hi, J-S, Mike, Leif,

Thanks for the replies. J-S, using the node visitor indeed seems 
like the best solution. I'll try that out for sure.

Cheers,

Yefei 

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:osg-users-
 [EMAIL PROTECTED] On Behalf Of Jean-Sébastien Guay
 Sent: Tuesday, April 08, 2008 7:39 AM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Shader question concerning GL_LIGHTING etc.
 
 Hi Yefei,
 
  Am I really reduced to modifying the core of OSG to add
  uniforms and set their values whenever a relevant GL call is being
  made?
 
 To add to what Mike and Leif said, you don't have to modify OSG. You
 could just write a visitor that does what you want, i.e. traverse the
 graph, checking for the state you need to set uniforms for, and then
 applying them. The same visitor could accumulate state from the root
 and
 when reaching a leaf node (geode), apply the right shader for the
 accumulated state.
 
 With a bit of work you can get a solution that's pretty general and
 works well, and which is also pretty optimal.
 
 Hope this helps,
 
 J-S
 --
 __
 Jean-Sebastien Guay[EMAIL PROTECTED]
 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] Dilemma with the usage of object Shaders in differendviews ...

2008-04-08 Thread Mike Weiblen
See the glsl_quickref.pdf there are several OSG-specific built-in
uniforms such as osg_ViewMatrix.  Also see glsl_simple.osg for example
of a single shader parameterized with different uniforms.

-- mew





 -Original Message-
 From: [EMAIL PROTECTED] [mailto:osg-users-
 [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
 revolution.org
 Sent: Tuesday, April 08, 2008 3:55 AM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] Dilemma with the usage of object Shaders in
 differendviews ...
 
 Hi folks,
 
 actually i am working on object shading with OSG (i.e. Dot3). All
works
 fine
 with single views. Now i am using the osgViewer::Composite viewer and
 getting
 some dielemma with the usage of object based shaders in differend
views
 based
 on the same scene graph.
 
 I.e.: I've a single scene node with an object X where i bind the
 shaders (at
 the object StateSet) for execution. In a single view no problem. If i
 use this scene in
 multiple views (i.e. A, B) i've the dilemma, that i've to use diffrend
 shader params
 on the same shader instance. In each rendering pass the params of the
 camera
 are differend from the point of view of the views, if the views are
 rendered. But
 the shader has no knowledge about this, it uses only a single uniform
 to hook bind
 param ...
 
 I've thought about the following sollutions:
 
 1. Using for each view a single shader instance at the same object
 StateSet.
 Is this usefull? If the scene is complex i could get a huge count of
 shaders
 which have to be executed. Additionally i'm not sure, if the binding
of
 the unused
 shaders produces render artifacts or perfomance issues...
 
 2. Using a callback mechanism which switches this values at the shader
 before
rendering
 
 How i could achieve this aim in best way? Has anyone a better
solution?
 
 Best regards,
 Christian
 
 
 
 ___
 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] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread Mike Weiblen
Gordon,
don't you have a FAQ on your website for this?
So we can just answer with a quick link?
-- mew


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:osg-users-
 [EMAIL PROTECTED] On Behalf Of Gordon Tomlinson
 Sent: Tuesday, April 08, 2008 9:14 AM
 To: 'OpenSceneGraph Users'
 Subject: Re: [osg-users] why arent the .h postfix used in
 openscenegraph?
 
 
 See
 http://www.openscenegraph.org/index.php?page=PlatformSpecifics.VisualSt
 udio
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Tuesday, April 08, 2008 9:31 AM
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] why arent the .h postfix used in
 openscenegraph?
 
 Allright.. I didn't know that was the standard, allways used and seen
 .h
 used. :)
 
 Thanks for your answer.
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 Jean-Sébastien Guay
 Sent: 8. april 2008 15:19
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] why arent the .h postfix used in
 openscenegraph?
 
 Hi,
 
  I figured out the syntax bit but arent .h c++ standard for include
 files??
 
 #include iostream
 #include string
 #include vector
 
 #include osg/Geode
 
 You can still use .h (I do, as do most others) but OSG elected to go
 the
 same route as the Standard C++ Library. See The C++ Programming
 Language
 by Bjarne Stroustrup for details.
 
 J-S
 --
 __
 Jean-Sebastien Guay[EMAIL PROTECTED]
 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
 
 
 ___
 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] cessnafire particle setup

2008-04-08 Thread Gerrick Bivins
Thanks Guy!
biv
On Apr 8, 2008, at 11:56 AM, Guy wrote:

 These files contain the fire and the smoke trail.

 Good luck,
 Guy.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of  
 Gerrick
 Bivins
 Sent: Tuesday, April 08, 2008 5:00 PM
 To: OpenSceneGraph Users
 Subject: [osg-users] cessnafire particle setup

 Hi ,
 Does anyone happen to have the code (or settings) to
 recreate the fire/smoke shown in cessnafire?
 biv
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
 g
 fire.osgtail of  
 fire.osg___
 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] cessnafire particle setup

2008-04-08 Thread nicolas peña
You cam always use osgEdit to get the part of an .osg file that you want and
save it in the osg format.

Cheers,
  Nicolas.



2008/4/8, Gerrick Bivins [EMAIL PROTECTED]:

 Thanks Guy!
 biv

 On Apr 8, 2008, at 11:56 AM, Guy wrote:

  These files contain the fire and the smoke trail.
 
  Good luck,
  Guy.
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of
  Gerrick
  Bivins
  Sent: Tuesday, April 08, 2008 5:00 PM
  To: OpenSceneGraph Users
  Subject: [osg-users] cessnafire particle setup
 
  Hi ,
  Does anyone happen to have the code (or settings) to
  recreate the fire/smoke shown in cessnafire?
  biv
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
  g

  fire.osgtail of
  fire.osg___

  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] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread Robert Osfield
On Tue, Apr 8, 2008 at 4:58 PM, Paul Martz [EMAIL PROTECTED] wrote:

 As others have stated, the compiler doesn't care about the header
 extension and enforces no standard extension. Therefore, those of us in
 OSG can do whatever we want. Indeed, the osgPlugins routinely use a .h
 extension for their header files. The absence of an extension
 creates problems for code editors that present non-intuitive interfaces for
 controlling syntax highlighting. Appending .h to OSG headers would
 eliminate this confusion.


There is a key difference between plugins and the includes is that plugins
are not at all public so consistency is less critical, where as the include
directories are the public face to the library so that everything has to be
consistent, and in the OSG case its consistent with Standard C++ headers.

As for using .h for telling editors that its a C++ file... well some editors
interpret it as C file and apply different syntax highlighting than they do
if its a C++ file.  This is the reason why so many silly extensions for C++
files came into existence.   Frankly if a modern C++ IDE doesn't interpret
an extension header as C++ then its pretty dumb as the standard library
itself has extensionless headers, one really has to question how well it
supports Standard C++ if doesn't properly handle this basic fact of C++.

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


[osg-users] Directory not found

2008-04-08 Thread Renan Mendes
Hi, everyone.

   I've opened the examples that came with OSG and, after correctly
configuring VS2005 (following step-by-step the installation process), I was
able to compile them. I've tried then, to create a new and very simple
project (with the same paths already configured), with the following code:

#include osg/Node

int main()
{
osg::Node* node = new osg::Node();
}

And the following error was displayed:
Cannot open include file: 'osg/Node': No such file or directory

What am I missing?

  Thanks,

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


Re: [osg-users] Directory not found

2008-04-08 Thread Robert Osfield
Hi Renan,

You just need to add the path to your OSG include files into  your  build
system.

Robert.

On Tue, Apr 8, 2008 at 7:59 PM, Renan Mendes [EMAIL PROTECTED]
wrote:

 Hi, everyone.

I've opened the examples that came with OSG and, after correctly
 configuring VS2005 (following step-by-step the installation process), I was
 able to compile them. I've tried then, to create a new and very simple
 project (with the same paths already configured), with the following code:

 #include osg/Node

 int main()
 {
 osg::Node* node = new osg::Node();
 }

 And the following error was displayed:
 Cannot open include file: 'osg/Node': No such file or directory

 What am I missing?

   Thanks,

  Renan M Z Mendes

 ___
 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] Debugging hangs on Cygwin compiled version [just won't let sleeping dogs lie]

2008-04-08 Thread Robert Osfield
Hi Brain,

The stack trace is for basic mutex initialization, threading itself hasn't
been kicked off my osgconv.

Perhaps it'd be useful to just write a simple bit of code with an
OpenThreads::Mutex that is created in a local scope to see if cywin is able
to construct it OK, next up I'd try a ReentrantMutex to see if these reveals
problems.

Robert.

On Tue, Apr 8, 2008 at 5:50 PM, Brian Keener [EMAIL PROTECTED]
wrote:

 Robert,

 The cygwin group has made a few changes in their threading I noticed
 and also a couple changes to the debugger so I decided to give OSG a
 try just to see if we get closer.  I did a little better getter a
 backtrace with a few things I picked up but still have a couple
 questions.





 Enclosed is a backtrace of the osgconvd at the point is generates a
 SIGSEGV.  Not sure if this is much help at this point but I was curious
 if you can give me some idea what it might be using that causes the ??.
  I know that probably means I am working with a stripped non debug
 version of something - I'm just not sure what or how to find out.

 I am working with a debug version of the Cygwin Dll and the OSG
 application and libraries and I was able to do an strace of osgconvd
 running but I haven't had a chance to wade through it yet.

 Any ideas how I might carry this further.

 --
 Brian Keener

 [EMAIL PROTECTED] /usr/local/bin/osgPlugins-2.3.7
 $ gdb osgconvd
 GNU gdb 6.5.50.20060706-cvs (cygwin-special)
 Copyright (C) 2006 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and
 you are
 welcome to change it and/or distribute copies of it under certain
 conditions.
 Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for
 details.
 This GDB was configured as i686-pc-cygwin...
 (gdb) set args cow.osg brian.osg
 (gdb) set cygwin-exceptions on
 (gdb) run
 Starting program: /usr/local/bin/osgconvd.exe cow.osg brian.osg
 Loaded symbols for /cygdrive/c/WINDOWS/system32/ntdll.dll
 Loaded symbols for /cygdrive/c/WINDOWS/system32/kernel32.dll
 Loaded symbols for /usr/local/bin/cygosgDBd-2.3.7.dll
 Loaded symbols for /usr/local/bin/cygOpenThreadsd-2.2.1.dll
 Loaded symbols for /usr/bin/cygwin1.dll
 Loaded symbols for /cygdrive/c/WINDOWS/system32/advapi32.dll
 Loaded symbols for /cygdrive/c/WINDOWS/system32/rpcrt4.dll
 Loaded symbols for /cygdrive/c/WINDOWS/system32/secur32.dll
 Loaded symbols for /usr/local/bin/cygosgd-2.3.7.dll
 Loaded symbols for /cygdrive/c/WINDOWS/system32/glu32.dll
 Loaded symbols for /cygdrive/c/WINDOWS/system32/msvcrt.dll
 Loaded symbols for /cygdrive/c/WINDOWS/system32/opengl32.dll
 Loaded symbols for /cygdrive/c/WINDOWS/system32/gdi32.dll
 Loaded symbols for /cygdrive/c/WINDOWS/system32/user32.dll
 Loaded symbols for /cygdrive/c/WINDOWS/system32/ddraw.dll
 Loaded symbols for /cygdrive/c/WINDOWS/system32/dciman32.dll
 Loaded symbols for /usr/local/bin/cygosgUtild-2.3.7.dll
 Loaded symbols for /usr/local/bin/cygosgViewerd-2.3.7.dll
 Loaded symbols for /usr/local/bin/cygosgGAd-2.3.7.dll
 Loaded symbols for /usr/local/bin/cygosgTextd-2.3.7.dll

 Program received signal SIGSEGV, Segmentation fault.
 0x610d5de9 in pthread_mutexattr_init (attr=0x23cb50)
at /usr/develop/src/src/src/winsup/cygwin/thread.cc:123
 123   if ((*object)-magic != magic)
 (gdb) thread apply all bt

 Thread 2 (thread 3936.0xe64):
 #0  0x7c90eb94 in ntdll!LdrAccessResource ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
 #1  0x7c90e288 in ntdll!ZwReadFile ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
 #2  0x7c801875 in ReadFile () from
 /cygdrive/c/WINDOWS/system32/kernel32.dll
 #3  0x0730 in ?? ()
 #4  0x in ?? ()

 Thread 1 (thread 3936.0xacc):
 #0  0x610d5de9 in pthread_mutexattr_init (attr=0x23cb50)
at /usr/develop/src/src/src/winsup/cygwin/thread.cc:123
 #1  0x610b2c98 in _sigfe ()
at /usr/develop/src/src/src/winsup/cygwin/cygerrno.h:31
 #2  0x0023cb90 in ?? ()
 #3  0x0004 in ?? ()
 #4  0x0001 in ?? ()
 #5  0x0028 in ?? ()
 #6  0x0023cbb8 in ?? ()
 #7  0x00ade1af in OpenThreads::ReentrantMutex::ReentrantMutex
 (this=0xc25ab0)
at /usr/src/OpenSceneGraph/include/OpenThreads/ReentrantMutex:29
 #8  0x00ade1af in OpenThreads::ReentrantMutex::ReentrantMutex
 (this=0xc25ab0)
at /usr/src/OpenSceneGraph/include/OpenThreads/ReentrantMutex:29
 ---Type return to continue, or q return to quit---
 #9  0x00a474e7 in __static_initialization_and_destruction_0 (
__initialize_p=1, __priority=65535)
at /usr/src/OpenSceneGraph/src/osg/GraphicsContext.cpp:188
 #10 0x00a475ee in global constructors keyed to
 _ZN3osg15GraphicsContext27setWind
 owingSystemInterfaceEPNS0_24WindowingSystemInterfaceE ()
at /usr/src/OpenSceneGraph/src/osg/GraphicsContext.cpp:290
 #11 0x61020493 in per_module::run_ctors (this=0x0)
at /usr/develop/src/src/src/winsup/cygwin/dll_init.cc:54
 #12 0x0001 in ?? ()
 #13 0x610204e0 in dll::init (this=0x610208bc)
at 

Re: [osg-users] Building VirtualPlanetBuilder and osgdem on Windows

2008-04-08 Thread Jean-Sébastien Guay
Hi Mike,

 The suggested dependency package, 
 osgtoy.svn.sourceforge.net/svnroot/osgtoy/3rdParty/branches/ does not 
 include GDAL. 

That's the 3rd party dependencies for OSG, not for VPB. OSG has no 
dependency on GDAL.

 Is there a new 
 dependency package somewhere that contains ALL the necessary components 
 and that has been checkout on Windows with the latest svn versions?

Use FWTools (http://fwtools.maptools.org/) in addition to the OSG 3rd 
party dependencies.

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
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


Re: [osg-users] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread Paul Martz
I agree that a C++ IDE should do the right thing for extensionless files
and assume they are C++ -- especially in the case where they are listed as
headers in the currently open project, for crying out loud :-). However, C++
IDEs aren't the only problem...
 
Consider any one of dozens of general purpose text editors with support for
source code syntax highlighting, which someone might use not just for
editing extensionless headers, but also for editing raw text files with
extensionless names like readme, passwd, and mnttab. Obviously I don't
want C++ syntax highlighting in just any old file that happens to not have
an extension. Files with extensionless names have existed long before C++,
and many are still around today that have nothing to do with C++. It was a
mistake for C++ to try to claim extensionless files as their own, a mistake
that currently plagues us on this list in the form of quarterly discussions
on the subject.
 
Although adding .h extensions to OSG headers would go a long way towards
eliminating this regular discussion topic, I'm certainly not calling for a
change: I'm an old timer, who grew up writing code with black teletype text
on rolls of white paper and punched cards (later, green CRT text on a black
background), so I could care less whether syntax highlighting is available.
Besides, as we all know, changing the headers to use .h is well-nigh
impossible at this point, it would completely alienate the existing user
base. However, I think lacking the .h extension is a mistake that I would
rectify, were I to write a next-generation scene graph.
   -Paul
 
 


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Tuesday, April 08, 2008 12:58 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] why arent the .h postfix used in openscenegraph?


On Tue, Apr 8, 2008 at 4:58 PM, Paul Martz [EMAIL PROTECTED] wrote:


As others have stated, the compiler doesn't care about the header extension
and enforces no standard extension. Therefore, those of us in OSG can do
whatever we want. Indeed, the osgPlugins routinely use a .h extension for
their header files. The absence of an extension creates problems for code
editors that present non-intuitive interfaces for controlling syntax
highlighting. Appending .h to OSG headers would eliminate this confusion. 


There is a key difference between plugins and the includes is that plugins
are not at all public so consistency is less critical, where as the include
directories are the public face to the library so that everything has to be
consistent, and in the OSG case its consistent with Standard C++ headers.  

As for using .h for telling editors that its a C++ file... well some editors
interpret it as C file and apply different syntax highlighting than they do
if its a C++ file.  This is the reason why so many silly extensions for C++
files came into existence.   Frankly if a modern C++ IDE doesn't interpret
an extension header as C++ then its pretty dumb as the standard library
itself has extensionless headers, one really has to question how well it
supports Standard C++ if doesn't properly handle this basic fact of C++.

Robert.


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


Re: [osg-users] Building VirtualPlanetBuilder and osgdem on Windows

2008-04-08 Thread Mike Greene
Robert Osfield wrote :

Hi Mike,

Could you try the SVN version of VPB as this may fix the CSLSetNameValue 
issue.  The other errors suggest that your Windows files as different 
than other Windows users have.  Could you specify the OS version etc.

Robert.

Well, I downloaded the April 1, 2008 SVN version. I'm using Windows XP 
Pro and Visual Studio 2005. The suggested dependency package, 
osgtoy.svn.sourceforge.net/svnroot/osgtoy/3rdParty/branches/ does not 
include GDAL. If I download the latest GDAL, the included Visual Studio 
2005 (Version 8) build solution does not work correctly. Is there a new 
dependency package somewhere that contains ALL the necessary components 
and that has been checkout on Windows with the latest svn versions?

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


Re: [osg-users] why arent the '.h' postfix used in openscenegraph?

2008-04-08 Thread Brian
The reasons for having extensionless header files have long been a question 
that I've never commented on (not just regarding OSG).  Perhaps the people 
writing the standards were trying to boycott certain command line tools such as 
grep that can really benefit from having files with extensions...  Who knows?

Anyway, I never complained about it because, as the old saying goes, never 
look a gift horse in the mouth.  I'll gladly put up with header files without 
the .h if it means getting to use a free tool  like OSG.

My 2 cents...

Brian


 On Tue Apr  8 15:48 , Paul Martz  sent:

I agree that a C++ IDE should do the right thing for extensionless files and 
assume they are C++ -- especially in the case where they are listed as headers 
in the currently open project, for crying out loud :-). However, C++ IDEs 
aren't 
the only problem...
 
Consider any one of dozens of general purpose text 
editors with support for source code syntax highlighting, which someone might 
use not just for editing extensionless headers, but also for editing raw text 
files with extensionless names like readme, passwd, and mnttab. 
Obviously 
I don't want C++ syntax highlighting in just any old file that happens to not 
have an extension. Files with extensionless names have existed long 
before C++, and many are still around today that have nothing to do with C++. 
It 
was a mistake for C++ to try to claim extensionless files as their own, a 
mistake that currently plagues us on this list in the form of quarterly 
discussions on the subject.
 
Although adding .h extensions to OSG headers would go 
a long way towards eliminating this regular discussion topic, I'm certainly 
not calling for a change: I'm an old timer, who grew up writing code with 
black 
teletype text on rolls of white paper and punched cards (later, green CRT 
text on a black background), so I could care less whether syntax highlighting 
is 
available. Besides, as we all know, changing the headers to use .h is 
well-nigh 
impossible at this point, it would completely alienate the existing user base. 
However, I think lacking the .h extension is a mistake that I would rectify, 
were I to write a next-generation scene graph.
   -Paul
 
 


  
  
  From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Robert 
  Osfield
Sent: Tuesday, April 08, 2008 12:58 PM
To: 
  OpenSceneGraph Users
Subject: Re: [osg-users] why arent the .h 
  postfix used in openscenegraph?


  On Tue, Apr 8, 2008 at 4:58 PM, Paul Martz [EMAIL PROTECTED] wrote:

  
  
As others have stated, the compiler 
doesn't care about the header extension and enforces no standard 
extension. Therefore, those of us in OSG can do whatever we want. Indeed, 
the osgPlugins routinely use a .h extension for their header files. The 
absence of an extension creates problems for code editors that present 
non-intuitive interfaces for controlling syntax highlighting. Appending 
 .h 
to OSG headers would eliminate this confusion. 
  
  
There is a key difference between plugins and the includes is that 
  plugins are not at all public so consistency is less critical, where as the 
  include directories are the public face to the library so that everything 
 has 
  to be consistent, and in the OSG case its consistent with Standard C++ 
  headers.  

As for using .h for telling editors that its a C++ 
  file... well some editors interpret it as C file and apply different syntax 
  highlighting than they do if its a C++ file.  This is the reason why so 
  many silly extensions for C++ files came into existence.   Frankly 
  if a modern C++ IDE doesn't interpret an extension header as C++ then its 
  pretty dumb as the standard library itself has extensionless headers, one 
  really has to question how well it supports Standard C++ if doesn't properly 
  handle this basic fact of 
C++.

Robert.


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


Re: [osg-users] Directory not found

2008-04-08 Thread Renan Mendes
Sorry to ask you this, but is it in Project-Properties-References-Add
Path?

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


[osg-users] load image file and store as a node

2008-04-08 Thread Bryan Berg
Hi,

 

So I was looking at:

 

http://www.openscenegraph.org/index.php?page=UserGuides.Plugins

 

Specifically:

 

a)osg::ref_ptrNode node = osgDB::readNodeFile(cow.osg); 

and

b)osg::ref_ptrImage image = osgDB::readImageFile(lz.rgb); 

 

 

I would like to load an image file (.bmp), which I believe I can do with a),
but than I need to save it as a node.

 

Is this possible?

 

Thanks!

 

-Bryan

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


Re: [osg-users] Directory not found

2008-04-08 Thread Mattias Helsing
Hi Renan,
It is in Project-Properties-Configuration-C/C++-General-Additional
include directories
Libraries path(s) are added at:
Project-Properties-Configuration-Linker-General-Additional library
directories
Libraries (osg.lib osgDB.lib etc) go in:
Project-Properties-Configuration-Linker-Input-Additional dependencies

The paths can also be added to the MSVC environment:
Tools-Options-Projects and solutions-VC++ Directories
or
Add paths to your environment variables INCLUDE and LIB

In unsure you can always look at project settings on the OSG examples and
applications, for example applications osgviewer in the main
OpenSceneGraph.sln

Mattias

On Tue, Apr 8, 2008 at 10:28 PM, Renan Mendes [EMAIL PROTECTED]
wrote:

 Sorry to ask you this, but is it in Project-Properties-References-Add
 Path?

 Renan

 ___
 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] vpb: flipped/mirrored elevation

2008-04-08 Thread Mattias Helsing
Hi Robert et al,
 
Turning off InterpolatedTerrainSampling does it for my sample data. That is - 
it did it using gdal 1.2.6. Following J-S advice I also tried using the gdal 
binaries from FWTools and then all is fine even with TerrainSampling.

Just thought there was a point in notifying the Win32/vpb part of the community 
that the (old) 3rdParty_Win32binaries...zip might be flawing a bit.
 
Mattias

On Wed, Apr 2, 2008 at 10:00 AM, Robert Osfield [EMAIL PROTECTED] wrote:
Hi Mattias,

I regret the day that I added the manual coordinate system options to
osgdem... its causes as much support as the rest of the VPB put
together.  Basically VPB is designed for use with geospatial imagery
and dem's, fudging things using non geospatial data is a right pain as
VPB really doesn't have proper coordinate system info to work with.

So if you can use geospatial imagery, its much simpler w.r.t osgdem
command line options and the vagaries of different data source being
orientated in different ways is removed.

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


Re: [osg-users] Directory not found

2008-04-08 Thread Renan Mendes
Hi, Mattias.

  Thanks for the information. Before that, I was having to use the
examples' projects to create my own project, for I didn't know the whole
configuration process.

   I've got one simple question, tough. You've said in your last email
that:

   The paths can also be added to the MSVC environment:
Tools-Options-Projects and solutions-VC++ Directories

   That's what I had done before. But what is it for? It seems that
compiler won't look for the files needed in the places there specified. I
could really use some information on this.

 Thanks again, and sorry for the trouble.

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


Re: [osg-users] why arent the .h postfix used in openscenegraph?

2008-04-08 Thread Scott
On Tue, Apr 8, 2008 at 3:48 PM, Paul Martz [EMAIL PROTECTED] wrote:

 Consider any one of dozens of general purpose text editors with support for
 source code syntax highlighting, which someone might use not just for
 editing extensionless headers, but also for editing raw text files with
 extensionless names like readme, passwd, and mnttab. Obviously I don't
 want C++ syntax highlighting in just any old file that happens to not have
 an extension. Files with extensionless names have existed long before C++,
 and many are still around today that have nothing to do with C++. It was a
 mistake for C++ to try to claim extensionless files as their own, a mistake
 that currently plagues us on this list in the form of quarterly discussions
 on the subject.


FWIW, there's no actual requirement in C++ that extensionless
headers are actually without extension.  It would be perfectly
reasonable for #include foo to actually include a file named foo.hxx
.  The headers need not even exist.

Also, competent format verification schemes do NOT look at the file
extension.  Example:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4 $ file algorithm
algorithm: ASCII C++ program text

 Although adding .h extensions to OSG headers would go a long way towards
 eliminating this regular discussion topic, I'm certainly not calling for a
 change: I'm an old timer, who grew up writing code with black teletype text
 on rolls of white paper and punched cards (later, green CRT text on a black
 background), so I could care less whether syntax highlighting is available.
 Besides, as we all know, changing the headers to use .h is well-nigh
 impossible at this point, it would completely alienate the existing user
 base. However, I think lacking the .h extension is a mistake that I would
 rectify, were I to write a next-generation scene graph.


I consider it much more worthwhile to use something that's *not* .h,
so that C++ headers are distinguished from those usable in both C and
C++ and better match the source file names.  Personally I prefer .hxx,
to go along with .cxx source files, but since .cpp is so common, .hpp
is perhaps a better choice.  (Even if cpp does mean C Preprocessor.)
*.?pp is a nice convenient glob, and even more so than can be done
with *.h headers.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org