[osg-users] Generating a cube using geometry shaders

2014-09-14 Thread Ahmed Hesham
Hi, I'm trying to generate a cube using GLSL shaders. The basic idea is to pass a single vertex that represents the center of the cube, and let the geometry shader do the calculations. No luck so far, the only output I get is a single white pixel (point) in the center of the screen. C++/GLSL

Re: [osg-users] Generating a cube using geometry shaders

2014-09-14 Thread Ahmed Hesham
CPP file: Code: #include osgDB/ReadFile #include osgViewer/Viewer struct ModelViewProjectionMatrixCallback : public osg::Uniform::Callback { ModelViewProjectionMatrixCallback(osg::Camera *fCamera) : _camera(fCamera) { } virtual void operator()(osg::Uniform *uniform,

Re: [osg-users] About HUD' projection

2014-09-14 Thread Bram Vaessen
For a normal 2D HUD I suggest orthogonal. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61031#61031 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] order of MatrixTransform

2014-09-14 Thread Bram Vaessen
Hi, I'm a little confused about something simple... the order in which to add MatrixTransform. For example I want to rotate something around x,y,z using 3 matrixtransforms. as I understand I can do this by: -translate(-x,-y,-z) -rotate -translate(x,y,z) when I add them, which is the correct

Re: [osg-users] order of MatrixTransform

2014-09-14 Thread Robert Osfield
HI Bram, On 14 September 2014 13:23, Bram Vaessen bram.vaes...@gmail.com wrote: Hi, I'm a little confused about something simple... the order in which to add MatrixTransform. For example I want to rotate something around x,y,z using 3 matrixtransforms. as I understand I can do this by:

[osg-users] OpenGL error 'invalid operation' when adding 'unsigned int' Uniform

2014-09-14 Thread Selmar Kok
Hi, I encountered something peculiar. Everything seems to work fine, though. I get the following warning message: Warning: detected OpenGL error 'invalid operation' at After Renderer::compile Investigating the issue (and stripping it down somewhat), I found that the error message

Re: [osg-users] order of MatrixTransform

2014-09-14 Thread Bram Vaessen
Thanks. Is there a way to make it a single node, but still being able to easily change the rotation around the point (the point on which to rotate doesn't change) ? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61035#61035

Re: [osg-users] order of MatrixTransform

2014-09-14 Thread Trajce Nikolov NICK
Hi Bram, If you use single MatrixTransform you can achieve the same effect in the way you are constructing the scenegraph above by multiplication of different matrices. Something like osg::MatrixTransform *mxt = new osg::MatrixTransform; mxt-setMatrix( osg::Matrix::translate(-myPoint) *

Re: [osg-users] order of MatrixTransform

2014-09-14 Thread Bram Vaessen
Ok thanks, I would have to recalculate the matrix every time the rotation changes I assume, but in the end that is probably more efficient than having 3 matrixtransforms in the scenegraph... right? -- Read this topic online here:

Re: [osg-users] order of MatrixTransform

2014-09-14 Thread Trajce Nikolov NICK
yes. This is what I think Robert had in mind when he mentioned performance efficiency Nick On Sun, Sep 14, 2014 at 10:42 PM, Bram Vaessen bram.vaes...@gmail.com wrote: Ok thanks, I would have to recalculate the matrix every time the rotation changes I assume, but in the end that is probably

[osg-users] OSG Android and Vuforia

2014-09-14 Thread David
Hi, Any one knows how to render an osg model in OpenGL ES 2.0? I am working on an Android project, and had been using the osgAndroid (https://gitorious.org/osgandroid) open source project, which supports OpenGL ES 1.x only, but Vuforia (QCAR) supports only ES 2.0. I have been trying to