Re: [osg-users] osgAndroid - Deploying and Debugging

2015-09-29 Thread Akhtar Shamim
Hi Rafa

Thank you for the pointer. I managed to compile and run the application in
an Android device successfully.
I have also managed to compile and run the osgAndroidExampleGLES1 on my
mobile device. I can see the blue background for the example together with
three buttons.

However, now when i try to load a model (cessna.osg) it shows error: dlopen
failed: library osgPlugins-3.4.0/osgdb_osg.so" not found.
DynamicLibrary::failed loading "osgPlugins-3.4.0/osgdb_osg.so". It is
strange because the build is static build yet it is looking for .so file.

I am not too sure why this is happening. Any pointer will be very helpful.

regards
Shamim


On Mon, Sep 28, 2015 at 5:08 PM, Rafa Gaitan  wrote:

> Hi Shamim,
>
> I added glustl_shared to be loaded dynamically before loading any
> osgAndroid jni library, because linking it statically was giving a lot of
> problems.
>
> I don't recall having problems before, but I usually work on linux or mac
> when I have to develop in android and OSG. Maybe is something related to
> the r10e NDK?.
>
> Anyway, could you check if you have in your
> org.openscenegraph.android/libs/armeabi/ the library libgnustd_shared.so?,
> if not, probably you need to copy it there from the NDK.
>
> I don't recall if I copied it by myself that or it's automated somehow by
> the NDK build system. But if you have it there along the libjni-osggles*.so
> libraries it will be deployed within the apk.
>
> Regards,
> Rafa.
>
>
> El lun., 28 sept. 2015 a las 9:34, Akhtar Shamim ()
> escribió:
>
>> Hi
>>
>> Recently we had a requirement to build OSG for Android and load a
>> OpenFlight MetaFight file. This is what I did:
>>
>> - Checkout the 3.4.0 stable release of OSG
>> - Installed Android NDK, SDK and Eclipse.
>> - Used the toolchain to compile OSG for GLES1
>> - Downloaded OSGAndroid from GitHub
>> - Imported to Eclipse
>> - Build all the four projects
>>
>> So far there is no problem at all. Everything went smooth.
>>
>> However, when I am trying to deploy the osgsimple application using
>> eclipse or trying to debug the application it throws an error saying:
>>
>> "Couldn't load gnustl_shared from loader dalvik.system.PathClassLoader".
>>
>> This is what I did:
>> - Modified Android.mk to have the correct OSG_SDK path
>> - Modified Android.mk to have the correct plugins (osgPlugins-3.4.0)
>>
>> Note:
>>
>> (a) No other changes made to any files downloaded from GitHub for
>> osgAndroid.
>> (b) The command used to configure cmake is <<<
>>
>> > set ANDROID_NDK=C:\Android\android-ndk-r10e
>> > "c:\Program Files (x86)\CMake 2.8\bin\cmake.exe" .. -G"MinGW Makefiles"
>> -DANDROID_NDK=C:/Android/android-ndk-r10e
>> -DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake
>> -DCMAKE_MAKE_PROGRAM="%ANDROID_NDK%\prebuilt\windows-x86_64\bin\make.exe"
>> -DOPENGL_PROFILE="GLES1" -DDYNAMIC_OPENTHREADS=OFF
>> -DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NATIVE_API_LEVEL=15
>> -DANDROID_ABI=armeabi -DCMAKE_INSTALL_PREFIX=C:/Android/OSG_ES1-3.4.0
>>
>> > make  -j 8
>> > make install
>>
>> 
>>
>> I tried the above in Windows 10.
>>
>> Any help to get this resolved will be greatly appreciated.
>>
>> regards
>> Shamim
>>
>>
>>
>>
>>
>>
>>
>> ___
>> 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Modern GLSL and OSG

2015-09-29 Thread Garth D


Hi Jan,

On 28/09/15 17:36, Jan Ciger wrote:

On Sun, Sep 27, 2015 at 9:28 PM, Garth D
 wrote:

As a side note, I have to say that I am really liking the ability to hang
Uniforms off arbitrary parts of the scene graph- generally on Geometry or
Groups depending on the scope that I need the Uniform to cover. It's really
a very nice design.



Uniforms are parts of the OpenGL state, same as e.g. bound textures,
shaders or lighting settings. If I grossly simplify things, the "only"
thing that OSG does is to manage this state for you - adds and removes
bits from the state depending on which part of the scene graph is
being drawn, all the while to make sure to minimize the amount of
these state changes (changing state of the driver is relative
expensive operation). It is one of the basic purposes of a scene
graph.


In the project I am working on the geometry is laid out in such a way 
that there are different levels of Groups under which certain Uniforms 
always hold the same value. It works really nicely with such a system.


Cheers,
Garth

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


[osg-users] OpenSceneGraph scripting interface

2015-09-29 Thread Sebastian Messerschmidt

Hi folks,

There has been some scripting support/reflection interface in OSG for 
quite a while now. Does anyone have some experiences here?
I didn't find any specific examples in source, nor some mail on this 
list explaining the interface.

Can anyone provide a minimal example?

The background of my question is some integration with C# where I want 
to keep the interface as thin as possible. A reply to post (title was 
OSG and .NET (C#) 
 
) of Robert dating back a year suggested to try this route, so I want to 
give it a try.

I'm a bit lost where to start however.
Also has someone some pointers how to manage the integration of OSG into 
some .Net environment?


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


Re: [osg-users] OpenSceneGraph scripting interface

2015-09-29 Thread Robert Osfield
Hi Sebastian,

In OSG-3.4 there is a new osgDB::ClassInterface that provides a easy easy
to access properties of scene graph classes in a generic way, and a way to
invoke methods.  Another component for scripting support is the new
osg::ScriptEngine, osg::Script and ScriptNodeCallback  classes which
provide a way to handle script callbacks (see include osg/ScriptEngine.)

For an example of use the ClassInterface + ScriptEngine for scripting is
provided by the lua plugin.  This is a full blown scripting implementation
so might be a lot to take in as an "example" but should give you a good
idea of how to integrate various elements.

Robert.

On 29 September 2015 at 13:19, Sebastian Messerschmidt <
sebastian.messerschm...@gmx.de> wrote:

> Hi folks,
>
> There has been some scripting support/reflection interface in OSG for
> quite a while now. Does anyone have some experiences here?
> I didn't find any specific examples in source, nor some mail on this list
> explaining the interface.
> Can anyone provide a minimal example?
>
> The background of my question is some integration with C# where I want to
> keep the interface as thin as possible. A reply to post  (title was OSG
> and .NET (C#)
> 
> ) of Robert dating back a year suggested to try this route, so I want to
> give it a try.
> I'm a bit lost where to start however.
> Also has someone some pointers how to manage the integration of OSG into
> some .Net environment?
>
> Cheers
> Sebastian
>
> ___
> 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] OpenSceneGraph scripting interface

2015-09-29 Thread Trajce Nikolov NICK
Hi Sebastian,

I have some experience with this and all I did I just exposed the viewer to
C# and used unmanaged dlls for the implementation. Here is the link with
the source code

http://comments.gmane.org/gmane.comp.graphics.openscenegraph.user/83902

If it helps

Cheers,
Nick



On Tue, Sep 29, 2015 at 2:19 PM, Sebastian Messerschmidt <
sebastian.messerschm...@gmx.de> wrote:

> Hi folks,
>
> There has been some scripting support/reflection interface in OSG for
> quite a while now. Does anyone have some experiences here?
> I didn't find any specific examples in source, nor some mail on this list
> explaining the interface.
> Can anyone provide a minimal example?
>
> The background of my question is some integration with C# where I want to
> keep the interface as thin as possible. A reply to post  (title was OSG
> and .NET (C#)
> 
> ) of Robert dating back a year suggested to try this route, so I want to
> give it a try.
> I'm a bit lost where to start however.
> Also has someone some pointers how to manage the integration of OSG into
> some .Net environment?
>
> Cheers
> Sebastian
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


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


[osg-users] Selecting techniques for an osgEffect in Camera Callbacks

2015-09-29 Thread Florent Berthaut
Hi all,

I recently switched from Ogre to OpenSceneGraph so that I can take advantage of 
the OpenGL 3+ possiblities, but i'm facing some issues getting some of what was 
working in Ogre work in OSG.

What I need to do is to render the same scene on different windows, each with a 
different material "scheme" / technique. 

Right now, I have a CompositeViewer, and one view and camera per window. 
I have an Effect that I placed at the root of my scene, in which I added two 
techniques.
For now i am just trying to select technique 0 for the first view, and 
technique 1 for all the other views.
 
I have tried switching the selected technique in the camera initial render 
callback (I use the singlethread threading model), so that the effect should be 
set to the correct technique before rendering the scene from that view. It 
seems that the technique is being switched correctly (if I cout the selected 
technique after calling setSelected ... ) . 

However, the visual result I am getting is not correct at all, i for example 
get the visual result of technique 1 for the second view instead of the first, 
and technique 0 for the second.

Is there something I need to do in addition to selectTechnique to ensure that 
the effect uses the correct technique for each view ? Or should I do that 
somewhere else than in a camera callback ?

Thanks in advance for your help 

Regards ,

Florent

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





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


[osg-users] OSG and NVX_gpu_memory_info

2015-09-29 Thread Garth D

Hi all,

I was wondering if anyone has been successful in using the 
NVX_gpu_memory_info extension with OpenSceneGraph, and the best place to 
call glGetIntegerv to get the associated values.


Details on the extension here: 
https://www.opengl.org/registry/specs/NVX/gpu_memory_info.txt


I'm using Linux, OSG 3.2.1, and a card that supports the 
NVX_gpu_memory_info extension.


I have tried querying the current and total memory using 
GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX and 
GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, and in each case but one, 
the values reported back are zero.


The only success I have had thus far has been querying the values via an 
osg::Operation set with ViewerBase::setRealizeOperation() on my viewer 
(osg::Viewer). The values returned appear to be correct. This allows me 
to get the correct values *once* at the start of the program. 
Unfortunately I need to query them periodically, and I have been unable 
to do this.


So far, I have tried hooking the calls into:
- An osg::Camera::DrawHandler, set via 
osg::Camera::setInitialDrawCallback().
- An osg::Node::NodeHandler, hooked into the root node via 
osg::Node::setUpdateCallback.
- An osg::Drawable::DrawCallback, hooked into a dummy chain off the root 
of: osg::Node -> osg::Geode -> osg::Geometry (osg::Drawable), via 
osg::Drawable::setDrawCallback.
- An osg::Drawable::CullCallback , hooked into a dummy chain off the 
root of: osg::Node -> osg::Geode -> osg::Geometry (osg::Drawable), via 
osg::Drawable::setCullCallback.
- An osg::Camera::DrawHandler, set via 
osg::Camera::setFinalDrawCallback(). Only partly-tested due to a 
race-condition that occurs in my code, but appears to fail.


I have experimented with osg::GraphicsContext::makeCurrent() with each.

Can anyone suggest a better place to hook these calls into? Or 
alternatively confirm that they have the extension working with one of 
the above, so I can change or experiment with my existing setup to try 
to make it work?


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


[osg-users] [osgPlugins] OpenFlight plugin update

2015-09-29 Thread Chris Kuliukas
Hi,

I've started writing an update to the OpenFlight plugin to support the 
"extended material" options in Creator, mainly so we can use the auto-generated 
bump-map textures in our shaders.

I don't want to have to redo it every time there's an OSG update though, so I'm 
wondering what the process is for submitting updates, and whether I can submit 
partial support for the new options or if it must be complete? (Since there's 
quite a lot to these extended materials and I'm mainly interested in certain 
aspects)

There are basically about 10 new opcodes / records, which affect the 
osg::Material and osg::StateSets that are generated as part of the FLT's 
material palette.

There are also other features introduced between now and 2009, when the last 
update happened, that I'm not interested in. Will it be okay for me to add in 
targeted support for the specific things we're interested in supporting? Or 
would this not get in and we should fork our own custom plugin?

Thank you!

Cheers,
Chris

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





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


Re: [osg-users] Oculus+OSG

2015-09-29 Thread Antoine Galluet
Hi,

Please tell me if you prefer me to post my issue in another thread to keep this 
one clean.

I'm starting with openscenegraph and the oculus. I compiled the viewer and I 
can load the basic example (cow, plane). 
But I have an error when I try to load one of my own .osgb.
The viewer returns me "InputStream::readObject<>: Unsupported wrapper class"

Do you have any clue of what's going wrong?
... 

Thank you!

Cheers,
Antoine

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





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


Re: [osg-users] Oculus+OSG

2015-09-29 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

On 29/09/15 12:22, Antoine Galluet wrote:
> Hi,
> 
> Please tell me if you prefer me to post my issue in another thread
> to keep this one clean.
> 

Please, don't hijack threads with unrelated issues. Make a new
thread/topic.

> I'm starting with openscenegraph and the oculus. I compiled the
> viewer and I can load the basic example (cow, plane). But I have an
> error when I try to load one of my own .osgb. The viewer returns me
> "InputStream::readObject<>: Unsupported wrapper class"
> 
> Do you have any clue of what's going wrong?


Your problem is likely because you are trying to load an .osgb file
that was exported by an incompatible OSG version. That has nothing to
do with Oculus Rift whatsoever.

Try to use osgconv on the file and convert it to .osg for example. If
you set OSG_NOTIFY_LEVEL env. variable to DEBUG, it might give you
idea why it has failed.


Regards,

Jan


-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iD8DBQFWCuWLn11XseNj94gRAqcnAJwJL/z9wZbD8nfGq6Ckc+AjBSzGZgCdGv0l
ETZWZaJidAldsagsFMCikDI=
=/Hf3
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to get all visible nodes

2015-09-29 Thread Artem Ivanov
Hi,

I'm new to OSG, so I think I have simple question, but I cannot find answer for 
it.
Actually I'm working with osgEarth and have some osgEarth::PlaceNodes on the 
terrain, some models and so on.
So, I have lots of views.

For some needs, I need a mechanism which will allow me to get all the views 
inside a screen 
(I mean which are visible to me at the moment and which are inside my screen). 
I didn't find any information about the way I can implement this.

I'm sure that I've missed something. 
I would appreciate any help with this. 

Thank you!

Cheers,
Artem

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





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