Hi Rafa
I am sorry that I couldnt reply to this email earlier.
I was away and couldnt check my emails for a couple of weeks.
Yes, I could do that. I will reply to your email next week after going
through the changes again.
I started working on the Android example. I have made a few changes to the
working sample osgAndroidExampleGLES1 for my convenience. I have made the
sample to be in fullscreen and added some overlay nodes for user interfaces.
Strangely i found another issue. For all PUSH events when i get -1 for
getXmin as well as getYmin where as +1 for getXmax and getYmax. However
getX returns a value which which is correct coordinate. Hence all the
getXnormalized and getYnormalized values returned are wrong.
This is what i did:
Create a simple event handler and added this to using
osgViewer::Viewer::addEventHandler method.
class LayerManagerEventHandler : public osgGA::GUIEventHandler
{
public:
LayerManagerEventHandler(LayerManager& layer) :
osgGA::GUIEventHandler(), _layerManager(layer) {}
virtual ~LayerManagerEventHandler() {}
bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&
aa)
{
// *** here ea.getXmin, ea.getYmin, getXmax and getYmax return
-1,-1,1,1 respectively.
// however getX return 897 and getY return 324 which is correct.
}
LayerManager& _layerManager;
};
//
This causes all the manipulators to fail. Did anyone observe this behavior?
Am i doing something wrong?
regards
Shamim
On Thu, Oct 1, 2015 at 2:48 PM, Rafa Gaitan wrote:
> Hi Shamim,
>
> I'm glad you made it work, but I'm concerned about the osgsimple sample in
> osgAndroid not working for you. Could you tell me if the logcat says
> something?, maybe the model you tried to load is not in the expected path?
>
> If you have any improvements to the OSG sample you can send a submission
> using the osg-submissions list. If you have any modification to osgAndroid,
> just send a pull request in github and I'll review the changes and merge
> them.
>
> Regards,
> Rafa
>
> El mié., 30 sept. 2015 a las 12:24, Akhtar Shamim ()
> escribió:
>
>> Hi
>>
>> Just an update.
>>
>> I managed to make osgAndroidExampleGLES1 work based on the Android.mk
>> settings for osgSimple and am able to load cessna.osg or any other osg
>> models. However, i am still not able to make osgSimple work based on the
>> predefined setting.
>>
>> If anyone is interested then I can provide a complete step by step guide
>> for making osgAndroid compile and run the osgAndroidExampleGLES1 example on
>> an Android device (with development environment on both Windows 10 and
>> Ubuntu 14.0.4)
>>
>> regards
>> Shamim
>>
>> On Tue, Sep 29, 2015 at 3:12 PM, Akhtar Shamim wrote:
>>
>>> 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.
>
>