Re: [osg-users] Using osga archive bigger than 2Go

2014-06-16 Thread Aurelien Albert
Hi,

I've found the problem :

In file osgPlugins\osg\BinaryStreamOperator.h, there is call to seekp / 
teelp to get current stream position, using int variables, which leads to 
problems if the stream size exceed 32-bits signed integer maximum limit.

I've sent a submission to solve this here : 
http://forum.openscenegraph.org/viewtopic.php?t=13928


Thank you!

Cheers,
Aurelien

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





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


Re: [osg-users] Disable light in shaders?

2014-06-16 Thread Jaime

robertosfield wrote:
 HI Jamie,
 
 When using shaders it's the shader itself that controls the lighting
 so the standard OpenGL lighting modes won't affect it.
 
 If you want to toggle lighting in shaders you'll need to assign a
 different shader or use a uniform that controls whether lighting is
 applied or not.
 
 Robert.
 
 On 12 June 2014 10:21, Jaime  wrote:
 
  Hi,
  
  I want to disable specific lights with OSG, and it affects models with 
  shaders. How can I do it?
  
  What I have now, it is not working. I apply shaders with:
  
  osg::StateSet* stateset = new osg::StateSet;
  [...load shader...]
  stateset-setAttributeAndModes(programObject, osg::StateAttribute::ON | 
  osg::StateAttribute::OVERRIDE);
  m_pDrawable-setStateSet(stateset);
  
  In execution, I wanto to disable some lights, and this change has to affect 
  shader (in the shader I have two lights). But, when I disable light in OSG, 
  it doesn't work. I have tested with and no succes:
  ss-setMode(GL_LIGHTING, osg::StateAttribute::PROTECTED | 
  osg::StateAttribute::OFF);
  ss-setMode(GL_LIGHTING, osg::StateAttribute::PROTECTED | 
  osg::StateAttribute::OFF);
  model-GetNode()-getOrCreateStateSet()-setMode(GL_LIGHT1, 
  osg::StateAttribute::OFF);
  
  If I test with normal models (without shaders), it works. But the problem 
  is with shaders. Do I have to turn off light in OpenGL?
  
  Thank you!
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=59711#59711
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


Thank you very much Robert! It worked!  :D 
I am using uniforms.

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





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


[osg-users] MergeGeometryVisitor behaviour, is this a bug?

2014-06-16 Thread Samuel M
Hello,

we were using the MergeGeometryVisitor for our geometry and lately realized 
that it totally ignores the setTargetMaximumNumberOfVertices settingf 1  
(or actually every setting).

While trying to comprehend what bool 
Optimizer::MergeGeometryVisitor::mergeGeode(osg::Geode geode) is trying to do 
I came across this code:

unsigned int numVertices(duplicateList.front()-getVertexArray() ? 
duplicateList.front()-getVertexArray()-getNumElements() : 0);
DuplicateList::iterator eachGeom(duplicateList.begin()+1);
// until all geometries have been checked or _targetMaximumNumberOfVertices is 
reached 
for (;eachGeom!=duplicateList.end(); ++eachGeom)
{
unsigned int numAddVertices((*eachGeom)-getVertexArray() ? 
(*eachGeom)-getVertexArray()-getNumElements() : 0);
if (numVertices+numAddVertices_targetMaximumNumberOfVertices)
{
break;
}
else
{
numVertices += numAddVertices;
}
}

// push back if bellow the limit
if (numVertices_targetMaximumNumberOfVertices)
{
if (duplicateList.size()1) needToDoMerge = true;
mergeList.push_back(duplicateList);
mergeListChecked.erase(itr);
}


This piece of code iterates over a given list of duplicates and fetches the 
vertex count of the first object. Then it iterates over second to last objects 
BUT for the second element it fetches numAddVertices and enters the given 
condition:
if (numVertices+numAddVertices_targetMaximumNumberOfVertices)

Our scenario has 3 vertices in first and 3 vertices in second geometry which 
result in 3+3  10. So the  code directly breaks.
Then it checks again for numVertices  targetMaximumNumberOfVertices which is 
still true and then PUSHES the entire list into mergeList.

Our example is a flight file consisting of thousands of geodes having only 3 
vertcies. The duplicateList has several thousand elements but the code checks 
only the first two and then pushes the first two AND the remaining thousands of 
geodes into the list to merge exceeding the _targetMaximumNumberOfVertices.


Shouldn't the condition
if (numVertices+numAddVertices_targetMaximumNumberOfVertices)
be 
if (numVertices+numAddVertices_targetMaximumNumberOfVertices)

and the  mergeList.push_back(duplicateList);
pushing only second to eachGeom range into the list?

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


[osg-users] Proposal: Migrate to a StackExchange like site?

2014-06-16 Thread Samuel M
Hello,

due to my long absence here I've realized that OpenSceneGraph has still this 
more than awful mailing list system from the early 1990. The forum mirror where 
I basically failed the captcha verification as I was presented with detecting 
something that looked like a celtic modification of an A (A was wrong :/) is 
quite dated too.

So I thought about asking whether there is an interest to move the support to a 
modern (probably better) level.

I hope many people already know stackoverflow (http://stackoverflow.com/) and 
the stackexchange team allows to propose a new site by posting it to 
http://area51.stackexchange.com/ . When enough interest is generated, the site 
will be public.

I mean come on. This mailing list still posts my own password back to me as 
plaintext and having the ability to participate at other stackexchanges sites 
with one account looks quite appealing while gaining a much better way of 
monitoring OpenSceneGraph instead of being either flooded by mails or getting 
none.

Plus: No ancient mail management anymore.

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


Re: [osg-users] Proposal: Migrate to a StackExchange like site?

2014-06-16 Thread Sonya Blade
+1 
Regards,From: spam.u...@hotmail.com
To: osg-users@lists.openscenegraph.org
Date: Mon, 16 Jun 2014 14:11:53 +0200
Subject: [osg-users] Proposal: Migrate to a StackExchange like site?




Hello,

due to my long absence here I've realized that OpenSceneGraph has still this 
more than awful mailing list system from the early 1990. The forum mirror where 
I basically failed the captcha verification as I was presented with detecting 
something that looked like a celtic modification of an A (A was wrong :/) is 
quite dated too.

So I thought about asking whether there is an interest to move the support to a 
modern (probably better) level.

I hope many people already know stackoverflow (http://stackoverflow.com/) and 
the stackexchange team allows to propose a new site by posting it to 
http://area51.stackexchange.com/ . When enough interest is generated, the site 
will be public.

I mean come on. This mailing list still posts my own password back to me as 
plaintext and having the ability to participate at other stackexchanges sites 
with one account looks quite appealing while gaining a much better way of 
monitoring OpenSceneGraph instead of being either flooded by mails or getting 
none.

Plus: No ancient mail management anymore.

Regards,
Sam
  

___
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] Proposal: Migrate to a StackExchange like site?

2014-06-16 Thread Jordi Torres
Hi Sam,

This has been discussed a number of times before. Here you have some
reasoning of why to use ML/Forum:

http://forum.openscenegraph.org/viewtopic.php?p=48314#48314

Cheers.


2014-06-16 14:14 GMT+02:00 Sonya Blade sonyablade2...@hotmail.com:

 +1

 Regards,
 --
 From: spam.u...@hotmail.com
 To: osg-users@lists.openscenegraph.org
 Date: Mon, 16 Jun 2014 14:11:53 +0200
 Subject: [osg-users] Proposal: Migrate to a StackExchange like site?


 Hello,

 due to my long absence here I've realized that OpenSceneGraph has still
 this more than awful mailing list system from the early 1990. The forum
 mirror where I basically failed the captcha verification as I was presented
 with detecting something that looked like a celtic modification of an A (A
 was wrong :/) is quite dated too.

 So I thought about asking whether there is an interest to move the support
 to a modern (probably better) level.

 I hope many people already know stackoverflow (http://stackoverflow.com/)
 and the stackexchange team allows to propose a new site by posting it to
 http://area51.stackexchange.com/ . When enough interest is generated, the
 site will be public.

 I mean come on. This mailing list still posts my own password back to me
 as plaintext and having the ability to participate at other stackexchanges
 sites with one account looks quite appealing while gaining a much better
 way of monitoring OpenSceneGraph instead of being either flooded by mails
 or getting none.

 Plus: No ancient mail management anymore.

 Regards,
 Sam

 ___ 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




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


Re: [osg-users] Proposal: Migrate to a StackExchange like site?

2014-06-16 Thread Samuel M
Hello,
thanks for the hint.
One of the features of SO would have been displaying similar post to reduce 
redundant mails like this one :/

Regards,
Sam

Date: Mon, 16 Jun 2014 14:39:33 +0200
From: jtorresfa...@gmail.com
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Proposal: Migrate to a StackExchange like site?

Hi Sam, 
This has been discussed a number of times before. Here you have some reasoning 
of why to use ML/Forum:
http://forum.openscenegraph.org/viewtopic.php?p=48314#48314

Cheers. 

2014-06-16 14:14 GMT+02:00 Sonya Blade sonyablade2...@hotmail.com:




+1 
Regards,From: spam.u...@hotmail.com

To: osg-users@lists.openscenegraph.org
Date: Mon, 16 Jun 2014 14:11:53 +0200
Subject: [osg-users] Proposal: Migrate to a StackExchange like site?





Hello,

due to my long absence here I've realized that OpenSceneGraph has still this 
more than awful mailing list system from the early 1990. The forum mirror where 
I basically failed the captcha verification as I was presented with detecting 
something that looked like a celtic modification of an A (A was wrong :/) is 
quite dated too.


So I thought about asking whether there is an interest to move the support to a 
modern (probably better) level.

I hope many people already know stackoverflow (http://stackoverflow.com/) and 
the stackexchange team allows to propose a new site by posting it to 
http://area51.stackexchange.com/ . When enough interest is generated, the site 
will be public.


I mean come on. This mailing list still posts my own password back to me as 
plaintext and having the ability to participate at other stackexchanges sites 
with one account looks quite appealing while gaining a much better way of 
monitoring OpenSceneGraph instead of being either flooded by mails or getting 
none.


Plus: No ancient mail management anymore.

Regards,
Sam
  

___
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




-- 
Jordi Torres





___
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] Proposal: Migrate to a StackExchange like site?

2014-06-16 Thread Jan Ciger
On Mon, Jun 16, 2014 at 2:56 PM, Samuel M spam.u...@hotmail.com wrote:
 Hello,
 thanks for the hint.
 One of the features of SO would have been displaying similar post to reduce
 redundant mails like this one :/


The first thing people are asked to do before posting a question to
any mailing list (or forum) is to search archives.
If you don't like the default forum or Mailman archives, there is
GMane: http://dir.gmane.org/gmane.comp.graphics.openscenegraph.user

It saves time for everyone.

Regards,

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


Re: [osg-users] Proposal: Migrate to a StackExchange like site?

2014-06-16 Thread Chris Hanson
I'm ok with the current system. I do answer OSG questions on stackexchange
already. I am fine with more questions over there, but remember that this
mailing list isn't just about questions and problems. There are other
discussions that go on here too.


On Mon, Jun 16, 2014 at 7:42 AM, Jan Ciger jan.ci...@gmail.com wrote:

 On Mon, Jun 16, 2014 at 2:56 PM, Samuel M spam.u...@hotmail.com wrote:
  Hello,
  thanks for the hint.
  One of the features of SO would have been displaying similar post to
 reduce
  redundant mails like this one :/


 The first thing people are asked to do before posting a question to
 any mailing list (or forum) is to search archives.
 If you don't like the default forum or Mailman archives, there is
 GMane: http://dir.gmane.org/gmane.comp.graphics.openscenegraph.user

 It saves time for everyone.

 Regards,

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




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] MergeGeometryVisitor behaviour, is this a bug?

2014-06-16 Thread Robert Osfield
Hi Sam,

It looks like a bug to me and your suggested fix looks appropriate.
I've applied this fix to svn/trunk and OSG-3.2 braches.

Thanks,
Robert.

On 16 June 2014 12:00, Samuel M spam.u...@hotmail.com wrote:
 Hello,

 we were using the MergeGeometryVisitor for our geometry and lately realized
 that it totally ignores the setTargetMaximumNumberOfVertices settingf 1
 (or actually every setting).

 While trying to comprehend what bool
 Optimizer::MergeGeometryVisitor::mergeGeode(osg::Geode geode) is trying to
 do I came across this code:

 unsigned int numVertices(duplicateList.front()-getVertexArray() ?
 duplicateList.front()-getVertexArray()-getNumElements() : 0);
 DuplicateList::iterator eachGeom(duplicateList.begin()+1);
 // until all geometries have been checked or _targetMaximumNumberOfVertices
 is reached
 for (;eachGeom!=duplicateList.end(); ++eachGeom)
 {
 unsigned int numAddVertices((*eachGeom)-getVertexArray() ?
 (*eachGeom)-getVertexArray()-getNumElements() : 0);
 if (numVertices+numAddVertices_targetMaximumNumberOfVertices)
 {
 break;
 }
 else
 {
 numVertices += numAddVertices;
 }
 }

 // push back if bellow the limit
 if (numVertices_targetMaximumNumberOfVertices)
 {
 if (duplicateList.size()1) needToDoMerge = true;
 mergeList.push_back(duplicateList);
 mergeListChecked.erase(itr);
 }


 This piece of code iterates over a given list of duplicates and fetches the
 vertex count of the first object. Then it iterates over second to last
 objects BUT for the second element it fetches numAddVertices and enters the
 given condition:
 if (numVertices+numAddVertices_targetMaximumNumberOfVertices)

 Our scenario has 3 vertices in first and 3 vertices in second geometry which
 result in 3+3  10. So the  code directly breaks.
 Then it checks again for numVertices  targetMaximumNumberOfVertices which
 is still true and then PUSHES the entire list into mergeList.

 Our example is a flight file consisting of thousands of geodes having only 3
 vertcies. The duplicateList has several thousand elements but the code
 checks only the first two and then pushes the first two AND the remaining
 thousands of geodes into the list to merge exceeding the
 _targetMaximumNumberOfVertices.


 Shouldn't the condition
 if (numVertices+numAddVertices_targetMaximumNumberOfVertices)
 be
 if (numVertices+numAddVertices_targetMaximumNumberOfVertices)

 and the mergeList.push_back(duplicateList);
 pushing only second to eachGeom range into the list?

 Regards,
 Sam

 ___
 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] Shader Problems, AMD is Fine, NVIDIA is not

2014-06-16 Thread Fitz Chivalrik
Hi,
seems like it was part of the problem, but not all of it.
Intel HD4400 and my AMD Cards still work fine, but the Quadro 600 is missing 
all light it seems, it s much darker then it shoud be, it seems like not all 
lights are used.
Furthermore, trying to get the shader work on the GTX 660 TI or 670 or 
something from NVIDIA is still not working, or it's messed up. (No Bingo, but 
still false light or all white).
Furthermore, the CommandLine is giving constantly:
warning: detected opengl eror 'invalid enumerant' at after 
RenderBin:.draw(...)
It should maybe maintain, that the working AMDs are running on Windows, while 
the Quadro 600 runs on Linux. But the non-working GTX ones are runnning 
windows, too.
Does anyone have an idea or an suggestion? Or would at least be so kind to 
answer me and tell me, that he has no idea? It is kind of depressing, posting 
questions and never get any answers. Seems not very noob friendly here to me...

Thank you!

Cheers,
Fitz

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





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


Re: [osg-users] BUG: osgGA::GUIEventAdapter returns wrong mouse ranges on android

2014-06-16 Thread Paul
I can confirm this issue. 

For android I use setUpViewerAsEmbeddedInWindow(0, 0, width, height)
and then setMouseInputRange(0, 0, width, height). I then send the input via 
getEventQueue()-mouseButtonPress(x, y, button); The input coordinates from 
android seem to be correct at this point, although it's flipped on the y axis. 
Now, when I catch and use the events to use in OSG, the coordinates are off.  
Is there an easy fix?

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





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