hi all, i try to create live wallpaper using irrlicht.
but live wallpaper use the draw iteration inside java.
how to make the draw iteratiin inside java and not using native activity ?
thanks in advance
android non-native
Re: android non-native
Irrlicht use NDK, but you can mix JAVA and C++ via jni calls, so you will be able to do iteration in JAVA and use Irrlicht for rendering.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: android non-native
well yes i understand that irrlicht use NDK ,
my problem is in the example 08 the IrrlichtDevice need an android_app object which passed from native android_main function.
and if i use JNI how to create IrrlichtDevice with android_app object....
here is what i try :
and the code stopped at createDevice... any help ... ??
my problem is in the example 08 the IrrlichtDevice need an android_app object which passed from native android_main function.
Code: Select all
void android_main(struct android_app* app)
{
app_dummy();
struct irr::SIrrlichtCreationParameters p;
p.DriverType = video::EDT_OGLES2;
// The android app object is needed by the irrlicht device.
p.PrivateData = app;
p.WindowSize = core::dimension2d<u32>(1280,800);
IrrlichtDevice *device = createDeviceEx(p);
}
here is what i try :
Code: Select all
void load()
{
__android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "Before Create Device");
device=createDevice( video::EDT_OGLES2, core::dimension2d<u32>(320, 240), 16, false, false, false, 0);
__android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "After Create Device");
driver = device->getVideoDriver();
smgr = device->getSceneManager();
}
Re: android non-native
In your jni code p.PrivateData is empty. It must include android_app data. Currently iOS and Android require createDeviceEx call for create device, simple createDevice doesn't work.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: android non-native
ok, is that mean i can't use irrlicht for android live wallpaper, yet? or there is another way ?
because android_app data only exist on native activity... CMIIW
because android_app data only exist on native activity... CMIIW
Re: android non-native
You can't use Irrlicht on Android without native activity (we don't have plans to change this state - support without ndk, even in future). Anyway you can still use some jni calls tricks, but I'm not sure if it's possible for features like a live wallpapers.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes