How to enable software rendering in lollipop? - android

I am working on an Android project where my device need to run by using software rendering.
My device architecture is ARM and I want to run lollipop using software rendering as my device dont have compatible hardware library file.
I came across that we need to set the flag USE_OPENGL_RENDERER to flase.
After setting also i am not getting the display ie getting android logo but not booting further.
What are the exact changes that i need to do in the source code to make it work with software rendering

I don't think Android supports devices without OpenGL for a while.
Android Compatibility Definition Document (CDD)
7.1.4. 2D and 3D Graphics Acceleration
Device implementations MUST support both OpenGL ES 1.0 and 2.0, as embodied and detailed in the Android SDK
documentations.

Related

HDRP support for Android, Unity?

I am building a VR android application for Oculus Quest 2 using HDRP. I am aware that on the Unity site it says that the HDRP support for Android is not there yet. But I wanted to confirm if there were any updates and/or the article on Unity is old Oculus Site. Since I am getting an error of "The platform Android with the graphic API Direct3D11 is not supported with High Definition Render Pipeline".
FYI I am using the Vulkan Graphics API.
The reported API is the one selected as Windows API (which is a bug).
Android will simply (and sadly) not build if you use HDRP, even though Vulkan does support compute shaders

running openCL in android

Well there are many tutorials and post about this, but I am not getting exactly how to deal with libOpenCL.so file. Many vendors does not include it inside phone, but my app needs to support maximum available phones today, so do I need to get compatible libOpenCL.so file for each of them?
OpenCL is not officially supported by Android Open Source Project
See: Why did Google choose RenderScript instead of OpenCL
However it appears that Device Manufacturers are including support by adding in the driver.
See: Does Android support OpenCL?
Realize that OpenCL is at a similar layer in the hardware stack as the graphics driver and any particular implementation will depend on the manufacturer and would be specific to that device. You can't just take a libOpenCL.so from one ARM64 device and expect to work for another due to system-on-a-chip specific customizations (number of cores, DSPs, GPUs etc.)
My recommendation from: C++, OpenCV and "what" for cross-platform GPU programing
If you want maximum support - stick to C/C++ code.
If you need OpenCL to make your app performant even with parallelized code, your option is to check if the library is there and warn the user about the lack of support. Ideally then fall back to the parallelized code on those devices without OpenCL.
Until Google makes OpenCL part of the Android Compatibility Definition Document and requires some metadata property, only by the app checking on the device can the app know that OpenCL is even available.
Adding to the answer of #Morrison Chang:
You can not rely on all version of OpenCL in all devices to have everything supported. So I would do a dinamic library loading, and query at runtime for the OpenCL methods are available.
Regarding the library with OpenCL support, sometimes is not even called like that. For example libGLESmali.so has OpenCL symbols and can be used directly.

How to know if GPU computing is used in OpenCv4Android native

I am programming a native app on Android using Opencv4Android. I am using the Opencv Manager. At the staup of the app, I receive these logs:
But how to know if openCv is really using OpenCl for acceleration or not ?
Unfortunately Google dropped OpenCL support for Android, for quite a while. This was done in favor of RenderScript.
So the first thing to do is to check your OpenCL availability on your platform. You could use OpenCL-Z. The tool will likely tell you if OpenCL runtime is present and if it can use both the GPU and the CPU.
The fact that OpenCV4Android is compiled with OpenCL support means that you can use the OpenCL specific namespaces. So if your platform has OpenCL, and in your code you use OpenCL specific objects (e.g. oclMat) your native code will use OpenCL.
Finally, you cannot be sure what OpenCL device (GPU / CPU) will be used by the OpenCV implementation. You can browse through the source of OpenCV and see the specific implementation for your kernels, or you could use the system profilers that are available for your Android device, and watch for GPU and CPU activity.
Thanks to VAndrei, I am now sure that I was not using OpenCL. I was not using the ocl package. Moreover I then tried the ocl package but I got an error at running at the first ocl code line. Then I checked with OpenCl-z and it seems that OpenCL is not available on the device (Rk3188).
I am quite surprised by the performance of the system (ARM Cortex-A9). For these lines, with a resolution of 160x120 on grayscale:
cv::absdiff(_inputMat, _previousMat, _outputMat);
_inputMat.copyTo(_previousMat);
cv::GaussianBlur(_outputMat, _outputMat, cv::Size(3,3), 2.0, 2.0);
cv::threshold(_outputMat, _outputMat, 100, 255, 0);
the system requires ~1.5ms. That is why I was wondering if OpenCl was used or not. Seems that Rk3288 is supporting OpenCl. I will have to check the improvements on htis other system.

SKMaps eglChooseConfig IllegalArgumentException

I have searched and searched this one and cannot seem to solve. Im running OSX 10.9 on an iMac with a ATI RADEON 4670 and and trying to get Skobbler Scouts maps to run on an Android emulator. All I keep getting is the dreaded eglChooseConfig() returning false using the inbuilt Android Emulator with all the prescribed settings set by Skobbler (gpu on API level etc etc). Is this a hardware incompatibility issue or is the Emulator just not implemented with the attribute settings set by Skobbler? Alternatively does anyone know of a working emulator for this SDK?
Any help is much appreciated. Thanks
Andy
You can find a working configuration at http://developer.skobbler.com/getting-started/android#sec031 (I've tested with device = Nexus 5 and API level 20).
Unfortunately, due to the fact that the SDK relies heavily on OpenGL most emulators will exhibit weird behaviours - leaving only real devices as good testing options (the emulator's documentation also states that OpenGL support is "tricky": "OpenGLĀ® Graphics - Emulation of OpenGL ES graphics may not perform at the same level as an actual device")

visualization tool for mobile (tablet)

I have a project for visualizing some data on tablet. I'll probably use android for developing the application but I have no idea that how could I visualize the real time data ?
which tools are available on android for doing this ? I noticed that I can use OpenGL ES but then I know nothing of this and it's quite complicated for me . Is there any other simple tool that could get the real time data and visualize it ?
we have a basic Matlab/Simulink visualization but need a better visualization.
Any suggestion ?
There are different options, but two commonly used visualization frameworks which are also available in Android are Processing (Processing for Android) and d3.js (which is a Javascript framework you could use in a WebView if you are 3.0 or above. The Android browser does not support SVG below 3.0.
You can use VES the OpenGL ES rendering toolkit from Kitware: http://www.vtk.org/Wiki/VES

Categories

Resources