开发者

porting C# to android

开发者 https://www.devze.com 2023-02-26 06:40 出处:网络
i\'m trying to code an app that creates开发者_运维问答 a spherize filter on a jpeg. i\'ve been struggling for a while with java code that does the distortion due to bufferedimage not being supported o

i'm trying to code an app that creates开发者_运维问答 a spherize filter on a jpeg. i've been struggling for a while with java code that does the distortion due to bufferedimage not being supported on android. i've been given this link that give a fisheye distortion written in C#. i'm considering porting this code to android using the ndk. i'm following this link in order to set up the ndk. my question is the code i'd like to use is written in c# whereas the given link above on how to set up the ndk is giving examples written in c++/c. is this a problem? Basically what i'm asking is if i set up my dev machine with the second link will i be able to use the code in the first link? thanks. mat


What you may want to do is port it using opengl es (http://www.khronos.org/opengles/) first, and your development machine. Once you get there then getting it to the android will be easier.

Did you write this in C# using the DirectX library originally?

You may want to just use OpenGL ES from Java also (http://developer.android.com/guide/topics/graphics/opengl.html), depending on the performance you need.

Update:

If you want to port from C# to OpenGL ES you can look at this library, which I haven't used, but appears good: http://www.opentk.com/.

For porting to Java you can look at this: http://www.badlogicgames.com/wordpress/?p=343

Before trying to get this on the Android, you may want to port the code to OpenGL ES first, in some language, then once you have the done, then going to Android will be considerably simpler as you will have the main part worked out already.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号