Can the Android phone use the windows DirectX library? - android

I have some functions which draws the game screen using the Direct X library in Windows.
So, I am trying to use the functions in Android phone using the ndk.
But I have some problems. Dose the Android phone which use the Java recognize the Direct X functions? If it is possible, then I must have some controls about it?
I want your help...

Android (and iOS as well) doesn't support DirectX but OpenGL ES. Check out 3D with OpenGL on the Android developer site.

Android uses a linux kernel, not a windows one. So I'd suspect no.

OpenGL is pretty similar to DirectX it doesn't take too much effort to convert between the 2. Failing that you could probably find the implementation in the Wine source code on how they handle DirectX calls and pass them to OpenGL.

No, because Android is based on Linux Kernel, whch supports OpenGL.

Related

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.

Setting up OpenGL ES 1.1, and my android environment

This may be a bit difficult, but I have a fairly complex question:
I'm fixing up an old Android phone I have from 2010 (very crap phone), to play with and experiment on. I want to write some OpenGL ES 1.1 programs (preferably in C) on it, but I have no idea how to set up my development environment.
Specifically, my question is this:
How can I set up my android device to run C code, and then link OpenGL ES 1.1 with it?
Would it be better to replace the OS (Android 2.1) with Ubuntu (or something else entirely)? I'm not sure it could run it very well, but it might simplify the process of getting the C code on it since I can just compile with GCC and run.
I've never really done something like this on a phone before (I've dabbled in the Java side of android), so any advice is appreciated.
Thanks!
You will need to setup your device to be able to deploy and debug with your system, which varies from device to device. If you've already got development in Java working on the device, then you shouldn't need to do anything additional to the setup device to develop in C/C++.
For your development machine, you will need to install at a bare-minimum the NDK. The NDK is also bundled as a package from several other sources, such as in the Tegra Android Developer's Pack, and now also Visual Studio 2015 RC. Which package you choose for development is a matter of preference.
In terms of developing for GLES 1.1, as far as I know, there are not any 'official' samples for developing for it, however, there are several tutorials around. In the NDK, you will need to #include <GLES/gl.h> to get the API. You can then take a look at Khronos' specifications on its usage.

Building an Irrlicht Game Engine C++ library with CCTools on android device without NDK

My question is - is it possible to compile a C++ library that uses some desktop features on mobile device - in this particular case the Irrlicht Engine? I know there is a port out there that uses OGLES drivers, but it also combines using the NDK. I would like to know if there is a possibility to build that library with such a tool like CCTools despite the fact that mobile devices use OpenGL ES - maybe some kind of equivalent libraries, that fit both mobile and desktop environments? There may be some incompatibilities, I know.
The system of input and output doesn't matter at the moment.
And of course - I haven't found the question that fits my expectations.
I wrote an article about porting desktop OpenGL apps to Android that might help:
http://software.intel.com/en-us/articles/porting-opengl-games-to-android-on-intel-atom-processors-part-1
I don't see the advantage of using CCTools rather than the NDK. I think the differences between OpenGL and OpenGL ES would be the biggest problem.

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

3D Engines for development on any mobile platform

I am planning to develop a game for all of the mobile platform and have pretty much zeroed down on the concepts of the game. but the only issue I'm facing as of now is that I have no idea what would be the best libraries + 3d Engine to us to achieve the best results on the hardware on some of the upcoming mobiles. I'm talking about the iPhone 3GS, the new WinMo and Android devices with the famed Snapdragon, other processors from Samsung, ARM, Qualcomm and even Intel and AMD.
as of now i plan to use the ogre libraries for now, but then what will offer portability?? This is much more of a design question rather than just coding. Any help is appreciated, others who wish to collaborate are very much welcome too. just drop me a mail.
I don't know much about Window Mobile, but (right now) there is a barrier to compatibility between Android and the iPhone: managed vs. native code. Android highly encourages you to write in Java, whereas the iPhone requires Objective-C or C++ (or C). Though Android does have a native development kit, they don't currently expose many libraries. They will add more APIs over time, but the Android devs will continue to encourage Java development, since Dalvik bytecode will run on any new device.
This is just my opinion, but I would focus on just one platform at the start. Pick your primary platform, write your core game code in portable C++ if you can, and keep the platform-specific parts separate from your core game code. Your goal is to get your game published. Once you have some money coming in, then start focusing on your second platform's port.
I would recommend you to use OpenGL ES and STL. Both Android and iOS platforms become more compatible with OpenGL and STL library, and it looks like every other mobile platform would follow this course (except, perhaps, Windows Phone 7.)

Categories

Resources