Re: [osg-users] Build Error

2013-01-04 Thread Alberto Luaces
Mohamed Alji writes:

 Hi,

 I have this build error please that's STOP the make of OpenSceneGraph

 Quote:
   
  

 --Build files have been written to: /Users//OpenSceneGraph-3.0.1  
   
  
 [ 0%] Building CXX object 
 src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Atomic.cpp.o
  
 
 /Users/OpenSceneGraph-3.0.1/src/OpenThreads/common/Atomic.cpp:146:48: 
 error: cannot initialize a parameter of type 'void *' with an lvalue of   
  
 type 'const void *const'  
   
  
 return __sync_bool_compare_and_swap(_ptr, ptrOld, ptrNew);   
   
  
 ^~
   
  
 1 error generated.
   
  
 make[2]: *** 
 [src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Atomic.cpp.o] 
 Error 1   
  
 make[1]: *** 
 [src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/all] Error 2 
   
 
 make: *** [all] Error 2   
   
  

 How to fix it please ?
 Thank you!

Hi Mohamed,

can you please try the version from SVN to see if it is already solved?

-- 
Alberto

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


[osg-users] Does OSG support ES2.0?

2013-01-04 Thread Paul Heraty
Hi,

According to the 3.0 release notes, OSG introduces support for OpenGL ES 1.1, 
OpenGL ES 2.0. 

I'm using OSG 3.1.1, and I have built an application which works fine when I 
compile OSG to use OpenGL. It's a pretty simple app that reads in a textured 
3DS model and displays it.

However, when I recompile OSG to use OpenGL ES2.0, the same application doesn't 
work so well. For example, the statistics text that appears from the 
osgViewer::StatsHandler does not appear at all, and I get lots of messages such 
as:

Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0x4000
Warning: Light::apply(State) - not supported
Warning: Material::apply(State) - not supported
Warning: TexEnvCombine::apply(State) - not supported
Warning: TexGen::apply(State) - not supported
Warning: TexMat::apply(State) - not supported

I've tried using the default OSG shaders and my own custom ones, but I get the 
same issues.

For reference, my (simple) shaders are:


Code:
varying mediump vec4 col;
varying mediump vec2 texcoord;
uniform mat4 osg_ModelViewProjectionMatrix;
attribute vec4 osg_MultiTexCoord0;
attribute vec4 osg_Color;
attribute vec4 osg_Vertex;
void main() {
  gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
  texcoord = osg_MultiTexCoord0.st;
  col = osg_Color;
}



and


Code:
varying mediump vec4 col;
varying mediump vec2 texcoord;
uniform sampler2D diffuseMap;
void main()
{
  vec4 base = texture2D(diffuseMap, texcoord);
  vec4 color = base;
  color *= col;
  gl_FragColor = color;
}



When I search the forums, I see lots of posts where people faced similar 
problems. But it's unclear how many of these problems have been 'fixed' in the 
main OSG code now.

So my question is: does the latest OSG (3.1.1) work with GLES2.0 or not? 

If it doesn't work 'out of the box', is there a document or example anywhere 
that shows how to display a 3ds model in ES2.0?

Thank you!

Cheers,
Paul

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





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


Re: [osg-users] Does OSG support ES2.0?

2013-01-04 Thread Jorge Izquierdo Ciges
OSG core works from the box what doesn't work from the box is osgText and
other things that require the user to include his own shader to make work
things. I have code that replaces the estandard stats handler with one 100%
compatible with GLES 2.0 BUT it's not something that we can include in OSG
because a more general solution is needed. If you want to use those
features simply include a shader that complies with GLSL/gles2 standard.

3ds can be rendered en GLES 1.0 and 2.0. Either you haven't included the
plugin and used the static initializer (if you are in Iphone or Android) of
the plugin or you have a model that uses some caracteristics not presented
in gles 2.0 like DXT compressed textures (something that we can't do a
thing)

So... first check if the model is even loaded and if OSG complains about it.

2013/1/4 Paul Heraty heratyp...@eircom.net

 en I search the forums, I see lots of posts where people faced similar
 problems. But it's unclear how many of these problems have been 'fixed' in
 the main OSG code now.

 So my question is: does the latest OSG (3.1.1) work with GLES2.0 or not?

 If it doesn't work 'out of the box', is there a document or example
 anywhere that shows how to display a 3ds model in ES2.0?

 Thank you!

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


Re: [osg-users] Does OSG support ES2.0?

2013-01-04 Thread Paul Heraty
Hi Jorge,

first off, thanks for the quick reply!

My model is being read in correctly. In fact, I can display it using the 
shaders I've attached above. What I'm concerned about are two things:

1/ Why all the warnings appear that I posted above? I attached the shader 
program to the root node, so I would not expect any other shaders to be used 
other than what I provide. Looking through the LogFileHandler text, I can see 
the model being read, my shaders being compiled etc. So where are all the other 
Light/Material/Tex*::apply(State) coming from? How can I remove them? I'm 
guessing there's still some default states being set by OSG?

2/ The stats handler text does not work. Would you be willing to share the code 
you have for this please?


Thank you!

Cheers,
Paul

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





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


Re: [osg-users] Build Error related OpenThreads

2013-01-04 Thread Mohamed Alji
Hi,

It is fixed in the OSG-.3.1.3 but I get rid of ffmpeg plugin and modified a 
CMakeList ...

Thank you!

Cheers,
Mohamed


Mohamed ALJI
Blog http://aljilogy.blogspot.fr


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




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


Re: [osg-users] Does OSG support ES2.0?

2013-01-04 Thread Paul Heraty
Hi,

after removing everything from my SG except the node with the 3DS model, I now 
see only a few warnings in the logfile. After the shaders are compiled and 
textures loaded, I get


Code:
Warning: detected OpenGL error 'invalid enumerant' at After Renderer::compile
openGL extension '' is not supported.
Setting up osg::Camera::FRAME_BUFFER
ShaderComposer::~ShaderComposer() 0x8c34ff0
Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
openGL extension '' is not supported.
Setting up osg::Camera::FRAME_BUFFER



Then I seem to get one of the RenderBin::draw(..) warnings per frame from then 
on.

Also, the text is still not working, so I'd really appreciate that if possible 
:)

Thank you!

Cheers,
Paul

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





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


[osg-users] Which GPGPU postprocessing method is best for me?

2013-01-04 Thread Ethan Fahy
Hello all,

I have an osg project that uses shaders to write float32 values representing 
temperatures to my framebuffer texture.  I would like insert a CUDA or OpenCL 
kernel to take those temperature values in the framebuffer and reinterpret them 
as colors based on various sensor effects.

My current understanding is that I may be able to accomplish this in 3 ways:
1.  osgPPU
2.  osgCompute/osgCUDA
3.  write something myself from scratch somehow...

I have spent a day or so reading through the documentation and forums for both 
osgPPU and osgCompute but I'm wondering if anybody might have suggestions for 
my particular use case so I optimize my research time.  As always my many 
thanks.

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





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


[osg-users] Custom culling that works with shaders

2013-01-04 Thread Glenn Waldron
Robert et al.,

The topic of culling vis-a-vis shaders has come up a few times recently.

The issue is: if you transform or emit vertices in a vertex, geometry, or
tessellation shader, the new position information is not available to OSG's
culling mechanism. This may result in visible geometry being culled.

One approach is to artificially inflate the bounds of your geometry. Not
very elegant. Cull callbacks won't help, since the visibility logic is in
CullStack::isCulled() which executes before any cull callbacks.

What I would like to do is use a custom frustum for culling. In my app I
have just such a frustum, and I tried applying it the the current
osg::CullingSet; but that CullingSet is automatically kept in sync with the
Camera frustum and my changes get overwritten.

I think we need a general-purpose solution, since this topic is bound to
come up again. Here are a couple ideas:

1) Allow the user to customize CullStack::isCulled() in some way, either
with a callback, or by making the isCulled() variants virtual.

2) Allow the user to apply a custom visibility frustum to the
osg::CullingSet. (Calling CullingSet::setFrustum works, but gets
automatically overwritten when there are subsequent Transforms in the scene
graph.)

I look forward to your thoughts.


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


Re: [osg-users] Does OSG support ES2.0?

2013-01-04 Thread Jorge Izquierdo Ciges
osg Text is really easy to make it work with ogl, you have to use a shaders
that is inherited by the osgText node that can read from texture and that's
pretty much all. The other errors... well openGL extension is not supported
will be probably because it needs some qualifier that it's not included.
Which extension is? I don't know... when i've had those things i had to
recompile several times OSG until I knew from where it comes and then fix
it. If you have a graphical debugger then you'll probalby find the invalid
enumerant by searching the operation code.


2013/1/4 Paul Heraty heratyp...@eircom.net

 Hi,

 after removing everything from my SG except the node with the 3DS model, I
 now see only a few warnings in the logfile. After the shaders are compiled
 and textures loaded, I get


 Code:
 Warning: detected OpenGL error 'invalid enumerant' at After
 Renderer::compile
 openGL extension '' is not supported.
 Setting up osg::Camera::FRAME_BUFFER
 ShaderComposer::~ShaderComposer() 0x8c34ff0
 Warning: detected OpenGL error 'invalid enumerant' at after
 RenderBin::draw(..)
 openGL extension '' is not supported.
 Setting up osg::Camera::FRAME_BUFFER



 Then I seem to get one of the RenderBin::draw(..) warnings per frame from
 then on.

 Also, the text is still not working, so I'd really appreciate that if
 possible :)

 Thank you!

 Cheers,
 Paul

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





 ___
 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] Does OSG support ES2.0?

2013-01-04 Thread Preet
To follow up on Jorge's reply:

Here's an example of how you can use shaders for osgText:
https://github.com/preet/scratch/blob/master/openscenegraph/osg_text_geometry/main_old.cpp

If you're still having issues, increase the OSG debugging output:
(osg::setDebugNotify(...)) and
osgViewer::getCamera()-getGraphicsContext()-getState()-
setCheckForGLErrors(osg::State::ONCE_PER_ATTRIBUTE)

to try and get a bit more info on the error. Something like APITrace (
https://github.com/apitrace/apitrace) might help too if you can get it
running on the target platform.

To get textures working properly on my platform I had to make a couple of
changes to the source. Unfortunately, for some stupid reason I accidentally
scrubbed the git history so I don't really have diffs of all the changes I
made. One specific thing I remember was having to set _glMaxTextureCoords =
1 in /src/osg/State.cpp to get textures working on my device.

Replace the if clause on line 900 with:

if ( osg::getGLVersionNumber() = 2.0 ||
osg::isGLExtensionSupported(_contextID,GL_ARB_vertex_shader) ||
OSG_GLES2_FEATURES)
{

glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,_glMaxTextureUnits);

#ifdef OSG_GLES2_AVAILABLE
_glMaxTextureCoords = 1;
#else
glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords);
#endif
}


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


Re: [osg-users] Which GPGPU postprocessing method is best for me?

2013-01-04 Thread Jeremy Moles

On 01/04/2013 09:33 AM, Ethan Fahy wrote:

Hello all,

I have an osg project that uses shaders to write float32 values representing 
temperatures to my framebuffer texture.  I would like insert a CUDA or OpenCL 
kernel to take those temperature values in the framebuffer and reinterpret them 
as colors based on various sensor effects.

My current understanding is that I may be able to accomplish this in 3 ways:
1.  osgPPU
2.  osgCompute/osgCUDA
3.  write something myself from scratch somehow...
Wang Rui is (I believe) in a Chinese time zone, but he may chime in here 
later today.


He is working on osgFX::EffectsCompositor, which I personally found 
incredibly well-written and easy-to-use.


Check out his code here:

https://github.com/xarray/osgRecipes

I have spent a day or so reading through the documentation and forums for both 
osgPPU and osgCompute but I'm wondering if anybody might have suggestions for 
my particular use case so I optimize my research time.  As always my many 
thanks.

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





___
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] Video textures on iOS (and audio)

2013-01-04 Thread Alessandro Terenzi
Hi Stefan,
thank you for the update, I look forward to trying the avfoundation plugin... 
but can you provide some help to let me configure CMake in order to generate a 
target for that plugin? So far it is missing in the project I get from CMake.

Thank you.
Alessandro

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





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


Re: [osg-users] Coursera Classes Coming Up!

2013-01-04 Thread Sergey Polischuk
Hi

there are great courses, but dont overestimate your time and capability, some 
courses are quite time consuming... last time i simultaneously started two 
courses with four weeks delay, and it was hard to catch up between work and 
stuff.

02.01.2013, 20:49, Jeremy Moles cubic...@gmail.com:
 Hey guys!

 You've probably heard by now, but there is a really great up-and-coming
 website/organization/movement called Coursera that I learned about last
 year.

 http://www.coursera.org
 https://www.coursera.org/user/i/cec974e9434316ce7625ee9df772effe

 There are some REALLY great math and graphics classes that start in the
 next few days, and I wanted to see if anyone was going to be taking the
 same classes as myself. Perhaps we could work together over Jabber and
 form a kind of study group. :)

 Anyways, hope you all had as great a 2012 as myself! Here's to another
 great one!

 P. S. All of our resolutions should be, henceforth, to never use the
 OpenGL FFP ever again!
 ___
 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] no WindowSystemInterface available ? WTH

2013-01-04 Thread Stephan Huber
Hi Mohamed,

check the OSG_WINDOWING_SYSTEM-var in cmake. It should be Cocoa.

cheers,

Stephan

Am 04.01.13 18:39, schrieb Mohamed Alji:
 Hi,
 
 I am trying to install OpenSceneGraph-3.1.3 from the SVN on my Mac OS X 
 Mountain Lion. 
 
 Do I need to install a specific WindowSystemInterface ? 
 
 
 Code:
 
 $ osgviewer cow.osg
  
 View::setUpViewAcrossAllScreens() : Error, no WindowSystemInterface 
 available, cannot create windows.
 Viewer::realize() - failed to set up any windows
 
 
 
 
 Thank you!
 
 Cheers,
 Mohamed
 
 
 Mohamed ALJI
 Blog http://aljilogy.blogspot.fr
 
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=51779#51779
 
 
 
 
 
 
 
 ___
 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] Video textures on iOS (and audio)

2013-01-04 Thread Stephan Huber
Hi Alessandro,

You'll need IOS 6.0 for the avfoundation-plugin. Check the
IPHONE_SDKVER-var in cmake, it should be 6.0

cheers,

Stephan

Am 04.01.13 19:16, schrieb Alessandro Terenzi:
 Hi Stefan,
 thank you for the update, I look forward to trying the avfoundation plugin... 
 but can you provide some help to let me configure CMake in order to generate 
 a target for that plugin? So far it is missing in the project I get from 
 CMake.
 
 Thank you.
 Alessandro
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=51780#51780
 
 
 
 
 
 ___
 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] Build Install OpenSceneGraph-3.1.3 give me a No WindowSystemInterface error ?

2013-01-04 Thread Mohamed Alji
Hi,

I build it with That var set to Cocoa ! Still have the problem. 

Thank you!

Cheers,
Mohamed


Mohamed ALJI
Blog http://aljilogy.blogspot.fr


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




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


[osg-users] Coursera Classes Coming Up!

2013-01-04 Thread Cory Riddell
Jeremy,

On the 2nd you mentioned some Coursera courses about to start. I looked
on the site and didn't see them. Have they already started?

Cory



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


Re: [osg-users] Coursera Classes Coming Up!

2013-01-04 Thread Cory Riddell

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