Re: [osg-users] OSG 3.2.1 + OculusViewer on Mac OSX 10.9 - Crash

2014-09-05 Thread Patrik Andersson
You need to run your application i debug mode, and trace the stack:

0   com.apple.driver.AppleIntelHD5000GraphicsGLDriver 0x1234003a5708
IntelVertexArray::setElemData(unsigned int, unsigned int, unsigned short,
unsigned int) + 140
1   com.apple.driver.AppleIntelHD5000GraphicsGLDriver 0x1234003a5667
IntelVertexArray::extractState(GLDVertexArrayDataRec const*, unsigned long
long) + 81
2   libGPUSupportMercury.dylib 0x7fff9118d6b6
gpusLoadCurrentVertexArray + 188
3   com.apple.driver.AppleIntelHD5000GraphicsGLDriver 0x1234003a3227
updateDispatch + 1355
4   GLEngine   0x7fff9aecf2a0 gleDoDrawDispatchCore
+ 502
5   GLEngine   0x7fff9ae76712
gleSetupAndDrawArraysOrElementsOutOfLine_ListExec + 841
6   GLEngine   0x7fff9ae0bc91 gleCallList + 165
7   libosgUtil.100.dylib   0x00010e8bea59
osgUtil::RenderLeaf::render(osg::RenderInfo, osgUtil::RenderLeaf*) + 181
8   libosgUtil.100.dylib   0x00010e8bb665
osgUtil::RenderBin::drawImplementation(osg::RenderInfo,
osgUtil::RenderLeaf*) + 309
9   libosgUtil.100.dylib   0x00010e8c2e27
osgUtil::RenderStage::drawImplementation(osg::RenderInfo,
osgUtil::RenderLeaf*) + 709
10  libosgUtil.100.dylib   0x00010e8c1f31
osgUtil::RenderStage::drawInner(osg::RenderInfo, osgUtil::RenderLeaf*,
bool) + 293
11  libosgUtil.100.dylib   0x00010e8c28c8
osgUtil::RenderStage::draw(osg::RenderInfo, osgUtil::RenderLeaf*) + 1058
12  libosgUtil.100.dylib   0x00010e8ca724
osgUtil::SceneView::draw() + 938
13  libosgViewer.100.dylib 0x00010e789396
osgViewer::Renderer::draw() + 856
14  libosg.100.dylib   0x00010e417673
osg::GraphicsContext::runOperations() + 185
15  libosg.100.dylib   0x00010e456325
osg::OperationThread::run() + 413
16  libosg.100.dylib   0x00010e419e31
osg::GraphicsThread::run() + 89
17  libOpenThreads.20.dylib   0x00010e39ebc2
OpenThreads::ThreadPrivateActions::StartThread(void*) + 178
18  libsystem_pthread.dylib   0x7fff9924a899 _pthread_body + 138
19  libsystem_pthread.dylib   0x7fff9924a72a _pthread_start + 137
20  libsystem_pthread.dylib   0x7fff9924efc9 thread_start + 13

I think + ### is the line number in corresponding cpp file.

Kind regards
Patrik


On Thu, Sep 4, 2014 at 5:01 PM, Felipe Ramos felipeber...@gmail.com wrote:

 Patrik,

 I tried to change to change the code you suggested and still get the crash
 when executing my program, but I don't know exactly what to do... Could you
 please give me more information about what actions I need to take?
 I changed some lines of the code (oculusdevice.cpp) and recompiled the lib.
 The source code and some images are attached to this message.
 Thanks in advance!



 Regards,
 Felipe

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




 ___
 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] Help: how to send non-filtered sampler2Drect to fragment shader?

2014-09-05 Thread Christian Buchner
I am always using the  texture2DRect() function to access my texture
rectangles. In combination with NEAREST sampling and passing pixel
coordinates as a vec2, this works just fine for getting the original pixel
values.

Is there a specific reason you are using texelFetch() ?

Christian


2014-09-04 23:03 GMT+02:00 shuiying Wang shuiying.w...@fu-berlin.de:

 On 09/04/2014 09:07 PM, osg-users-requ...@lists.openscenegraph.org wrote:

 OpenGL filtering of texture is controlled using the Texture::setFilter(..)
 method.

 The osg::Image settings only related to storage of the data, not filtering
 done by OpenGL.

 Could it be that your texelFetch(..) function in your GLSL is doing
 filtering?

 --

 As a general note of using the mailing list for support, could you avoid
 replying to digest posts as this breaks the threading done by mail clients
 so that your reply no longer gets associated with the original thread.  I
 find that modern mail clients are good at automatically managing the
 volume
 of traffic from mailing lists so there shouldn't really be a need to use
 the digest options.

 Robert.

 Robert.


 Hi Robert,

 Thanks!

 Sorry I forget about how to use this mailing list.

 I just searched in the internet. And I find that texelFetch does not have
 any interpolation.

 So I still have no idea.


 Shuiying

 ___
 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] Positional Animation

2014-09-05 Thread Chris Hidden
Hey everyone.

I may be interpreting how this is done improperly, but all I want at the moment 
is to animate two hand models.  

I have two osg::MatrixTransform objects which I add my loaded hand models too.

I then attach an instance of a class that extends from osg::NodeCallback

Then in that class i have: 


Code:

public:
HandMovementX() :incrementer(-0.5), incrementer2(-0.5), pitch(-90.0), 
roll(12.0){}

virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{

OSG_FATAL  Being called  std::endl;
roll += incrementer2;
if (roll  57)
incrementer2 = -0.5;
if (roll  -33)
incrementer2 = 0.5;

pitch += incrementer;
if (pitch  -135)
incrementer = 0.5;
if (pitch  -90)
incrementer = -0.5;


osg::MatrixTransform *trans = dynamic_castosg::MatrixTransform 
* (node);
if (trans != NULL)
{
osg::Matrixd handRotation;
handRotation.makeRotate(
osg::inDegrees(90.0f), osg::X_AXIS,
osg::inDegrees(pitch), osg::Y_AXIS,
osg::inDegrees(roll), osg::Z_AXIS
);
trans-setMatrix(handRotation * 
osg::Matrix::translate(15, 0, 8) );
worldCoordMatrix = 
osg::computeLocalToWorld(nv-getNodePath());

}
traverse(node, nv);
}

private:
osg::Matrix worldCoordMatrix;
float pitch;
float roll;
float incrementer;
float incrementer2;





The hands are moving, but not at all how I want them too and it seems that it 
animates first the Y axis and then the Z axis and then the translate.  I want 
all positions to be taken into account in a single movement on each frame. Am I 
approaching this totally wrong or what?

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





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


Re: [osg-users] Positional Animation

2014-09-05 Thread Jason MacDonald
I'm unsure of your method, but here is how I handle it:
_position is a PositionAttitudeTransform

Quat h,r,p;
h.makeRotate(osg::DegreesToRadians(heading), Vec3d(0,0,1));
p.makeRotate(osg::DegreesToRadians(pitch), Vec3d(0,1,0));
r.makeRotate(osg::DegreesToRadians(roll), Vec3d(1,0,0));
_position-setAttitude(r*p*h);

Jason

-Original Message-
From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Chris Hidden
Sent: Friday, September 05, 2014 5:35 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Positional Animation

Hey everyone.

I may be interpreting how this is done improperly, but all I want at the moment 
is to animate two hand models.

I have two osg::MatrixTransform objects which I add my loaded hand models too.

I then attach an instance of a class that extends from osg::NodeCallback

Then in that class i have:


Code:

public:
HandMovementX() :incrementer(-0.5), incrementer2(-0.5), pitch(-90.0), 
roll(12.0){}

virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{

OSG_FATAL  Being called  std::endl;
roll += incrementer2;
if (roll  57)
incrementer2 = -0.5;
if (roll  -33)
incrementer2 = 0.5;

pitch += incrementer;
if (pitch  -135)
incrementer = 0.5;
if (pitch  -90)
incrementer = -0.5;


osg::MatrixTransform *trans = dynamic_castosg::MatrixTransform 
* (node);
if (trans != NULL)
{
osg::Matrixd handRotation;
handRotation.makeRotate(
osg::inDegrees(90.0f), osg::X_AXIS,
osg::inDegrees(pitch), osg::Y_AXIS,
osg::inDegrees(roll), osg::Z_AXIS
);
trans-setMatrix(handRotation * 
osg::Matrix::translate(15, 0, 8) );
worldCoordMatrix = 
osg::computeLocalToWorld(nv-getNodePath());

}
traverse(node, nv);
}

private:
osg::Matrix worldCoordMatrix;
float pitch;
float roll;
float incrementer;
float incrementer2;





The hands are moving, but not at all how I want them too and it seems that it 
animates first the Y axis and then the Z axis and then the translate.  I want 
all positions to be taken into account in a single movement on each frame. Am I 
approaching this totally wrong or what?

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
This email and any files transmitted with it from The Charles Machine Works, 
Inc. are confidential and intended solely for the use of the individual or 
entity to which they are addressed. If you have received this email in error 
please notify the sender. Our company accepts no liability for the contents of 
this email, or for the consequences of any actions taken on the basis of the 
information provided, unless that information is subsequently confirmed in 
writing. Please note that any views or opinions presented in this email are 
solely those of the author and do not necessarily represent those of the 
company. Finally, the recipient should check this email and any attachments for 
the presence of viruses. The company accepts no liability for any damage caused 
by any virus transmitted by this email.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG 3.2.1 + OculusViewer on Mac OSX 10.9 - Crash

2014-09-05 Thread Felipe Ramos
I already did that, that's how i got this crash log... Still doing it, I could 
not identify a specific cause to the crash, and I would like to know if someone 
had this problem before and know how to solve it, if someone have some 
hint... I don't have an ideia on what to do now.
Thanks for replying anyway!

Regards,
Felipe

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





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


Re: [osg-users] OSG 3.2.1 + OculusViewer on Mac OSX 10.9 - Crash

2014-09-05 Thread Robert Osfield
Hi Filipe,

I don't have an OSX box, or Occulus Rift or experience with their SDK, so
can't provide an specific advice.

What I would say is that unless others have seen the exact problem you are
having then with the given information it's unlikely they'll be able to
help.   If others haven't been able to help so far then there is good
chance that you will need to do more testing and scope out the problem more
for yourself and keep us informed of this testing, at some point there
might be an eureka moment and spot the problem so it can be resolved.

Tests I'd do in your situation are:

  1) Test OSG examples on their own with the models you want to work with -
does it work?
  2) Test on another machine, it could well be that the drivers are at
fault.
  3) Check with Occulus Rift support to see if others under OSX have seen
similar errors.
  4) Run Occulus test programs without the OSG.

What you are looking for is a pattern of the error to scope out what might
be wrong.  Keep updating this thread with reports how your testing has done
so others know what works and what doesn't.

Robert.






On 5 September 2014 14:15, Felipe Ramos felipeber...@gmail.com wrote:

 I already did that, that's how i got this crash log... Still doing it, I
 could not identify a specific cause to the crash, and I would like to know
 if someone had this problem before and know how to solve it, if someone
 have some hint... I don't have an ideia on what to do now.
 Thanks for replying anyway!

 Regards,
 Felipe

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





 ___
 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] OSG 3.2.1 + OculusViewer on Mac OSX 10.9 - Crash

2014-09-05 Thread Felipe Ramos
Hi,

I've tried in Windows 7 (64-bit) and I think (didn't have much time to make 
some tests yet) it worked! The only issue I've noticed was that the model 
wasn't at the center of the screen, but it didin't crash. I'll check out this 
later again. Used a pre-compiled osg 3.2.0 binaries from 
http://www.helleboreconsulting.com/index.php/open-source/openscenegraph

Maybe it's something wrong with Mac OS X libraries, I don't know... Because 
I've made some tests on another macbook and had the same crash.
Anyway, I still need to solve this problem with the macs... I'm gonna make more 
tests with other versions of OSG and other build configurations to see what I 
get...

Regards,
Felipe

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





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