[osg-users] kdTree and sphere intersection

2011-11-16 Thread Peter Wraae Marino
Hi,

I have create a sphereintersector which works fine, but goes through all 
triangles on the geometry.

I would like to use the kdTree to help me to do a sphere - triangle 
intersection tests on as few triangles as possible.

Is this possible? When I look at the kdTree object it looks like it is 
hardcoded to handle only line segments?

anyone have some comments on this?

Thank you!

Cheers,
Peter

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43908#43908





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


Re: [osg-users] RenderBin-question/problem

2011-11-16 Thread Laurens Voerman

Hi Stephan,
You created a nested renderbin, and because of its non negative bin 
number it will draw after the contents of the first bin.

Both are DepthSortedBin with binNumber 10.

Regards, Laurens.

On 11/14/2011 5:56 PM, Stephan Maximilian Huber wrote:

Hi

I am having problems with renderbins, this is maybe a bug in osg or I
have problems to understand the concepts behind renderbins.

Here's a simplified test:

root
+ PAT 1
   + geode
 + geo
   + PAT 2
 + geode
   + geo
+ PAT 3
   + geode
 + geo


the root-group has a stateset with TRANSPARENT_BIN, PAT 1 is positioned
at (0/0/0) and has a geode containing a geometry with a red quad (see
links) and another PAT 2 holding some linestrip geometry.  PAT 3
contains a geode with a green geometry, positioned at 100/100/100. The
camera projection matrix is basically a hud.

When PAT 2 has a stateset with
-setRenderingHint(osg::StateAttribute::TRANSPARENT_BIN) then the
depth-sorting is wrong (see bad.osg), if I remove the
setRenderingHint-call, everything is correct (good.osg).

So what's wrong with my setup? basically all drawables should end in
render-bin 10, regardless of additional setRenderingHint-calls by
enclosed childs, shouldn't they?

AFAIK this worked in previous versions of osg.

Attached you'll find two osg-models showing the problem and the
corresponding screenshots:

good: http://scrups.cefix.org//8k/ikhqjtvumlwco.png
bad : http://scrups.cefix.org//8r/nozjb4u5y8owc.png

This is with a recent checkout of osg-trunk (3.1.0)

cheers,
Stephan


___
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] osgText and GLES2

2011-11-16 Thread Thomas Hogarth
Hi All

I've been using osgText on GLES1 with some good results, I'm now moving to
gles2 and am having some issues. I've attached a basic shader to get things
started which looks like the following

uniform sampler2D diffuseTexture;\n
varying mediump vec2 texCoord0;\n
void main(void) {\n
  gl_FragColor = texture2D(diffuseTexture, texCoord0).;\n
}\n

This has worked in the past on windows and i've seen it mentioned in this
post

http://forum.openscenegraph.org/viewtopic.php?t=5340

However on GLES 2 I'm getting just solid white quads at the location of
each texture quad. I've found this in my log output


Created new 0x8e5e410 TextureObject, _numOfTextureObjects 1
glGetString(GL_RENDERER)==PowerVR SGX 535
before Glyph::subload(): detected OpenGL error: invalid enumerant
after Glyph::subload() : detected OpenGL error: invalid enumerant
glTexSubImage2D(0xde1 ,0
1 ,1
18 ,22
0x1906
0x1401
0x8e21fa0);
Glyph::subload(): texture sub-image width and/or height of 0, ignoring
operation.
Glyph::subload(): texture sub-image width and/or height of 0, ignoring
operation.


The width and height look to be 18 and 22 to me, does anyone know what the
issue might be.

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


Re: [osg-users] osgViewer::GraphicsWindowEmbeded causing OpenGL error

2011-11-16 Thread Joshua Cook
Robert,

it seems to work ok now.  The view on each of the cave walls is good and I'm 
even getting stereo now.  I'm still getting an OpenGL error but I can't see 
what problems it is causing; lighting, textures, perspective, placement, and 
all the rest look good.

The older code I am using as an example uses glGetFloatv to get the perspective 
and view matrixes.  Well, in my code, glGetFloatv is returning an identity 
matrix for the projection matrix (which is probably part of the OpenGL error 
reported).  Since I saw what looked like the inside of the example .ive I've 
been using I didn't think that the perspective was off.  Using the CAVElib 
matrixes fixes the view problem.

Anyhow, thanks for your help again.

Josh

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43911#43911





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


[osg-users] osg plugins

2011-11-16 Thread Andy Skinner
We're just moving from 2.8.something to 3.0.1.  Looks like I should update from 
using .osg to .osgx.

While I was looking at that, I was wondering about this line from 
DogOSGWrapper.cpp:
 if 
(osgDB::Registry::instance()-loadLibrary(*itr)==osgDB::Registry::LOADED) 
return writeObject(obj,fw);
It looked to me that loadLibrary() was returning PREVIOUSLY_LOADED.  Should the 
condition be != osgDB::Registry::NOT_LOADED?

I'm not familiar with this code, but that seemed odd to me.

thanks
andy

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


Re: [osg-users] Development of Qt support as part of osgViewer

2011-11-16 Thread Jinshan Hu
What about stellarium which base on OpenGL and qt?
 Please visit: http://www.stellarium.org
I wish some day I can develop some application like it base on osg and qt.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43913#43913





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


[osg-users] Performance results? Intel (icc) or GNU gcc?

2011-11-16 Thread Brad Colbert
Hi folks,

This is a general question for those who have tried out the Intel compiler.

For those who have, I'm wondering what your experience has been with 
performance.  Did you see an increase in the performance of OSG on your system 
when compiled with the Intel compiler?  If so, can you quantify it?

Thanks!

-B

---
Brad Colbert
Renaissance Sciences Corporation
(480) 374-5073


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


Re: [osg-users] Performance results? Intel (icc) or GNU gcc?

2011-11-16 Thread Chris 'Xenon' Hanson
On 11/16/2011 9:09 AM, Brad Colbert wrote:
 This is a general question for those who have tried out the Intel compiler.
 For those who have, I'm wondering what your experience has been with 
 performance.  Did you see an increase in the performance of OSG on your 
 system when compiled with the Intel compiler?  If so, can you quantify it?

  I'm curious too, because a couple years ago a dev team I know dropped the 
Intel compiler
because it was generating slower code than MSVC++.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist. - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] ShapeDrawable problem

2011-11-16 Thread Klaus Madeira
Hi,

I change my application to do not use shapeDrawables anymore and it worked 
perfectly! Now I'm using osg::geometry and it is fine.

Thank you, Robert.

Cheers,
Klaus

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43917#43917





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


Re: [osg-users] ShapeDrawable problem

2011-11-16 Thread Klaus Madeira
Hi,

I change my application to do not use shapeDrawables anymore and it worked 
perfectly! Now I'm using osg::geometry and it is fine.

Thank you, Robert.

Cheers,
Klaus

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43918#43918





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