Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions used in Unity ArWrapper removed #139

Open
yichuan1118 opened this issue Feb 6, 2018 · 8 comments
Open

Functions used in Unity ArWrapper removed #139

yichuan1118 opened this issue Feb 6, 2018 · 8 comments

Comments

@yichuan1118
Copy link

Hi,

With recent changes in this repo, functions like (arwUpdateTextureGLStereo) are removed from ArWrapper. If I build new versions of libArWrapper.so and copy them to Arunity, arunity fails to build in Xcode. Is there a way / plan to update the Arunity repo to reflect these changes? (Is the update done programmatically or manually?) I can help with the update if someone can point the way :)

@ThorstenBux
Copy link

Hi @yichuan1118 I welcome any contribution to the ARUnity repo. I'll do it eventually but have some more pressing issues to solve at the moment. Regarding build of the pieces for Unity it is done manually by building the libs from the artoolkit repo and copying them to the right place in the ARUnity repo. I haven't done that in a while but there is a good readme for the Android part here: https://github.com/artoolkitx/arunity5/tree/master/src/Android_Unity_Player_Source/AndroidStudioProj

maybe that helps getting started for the XCode part as well. Otherwise I'm happy to support you on the way.

@yichuan1118
Copy link
Author

Thanks for the info, I will look into it and see if I can make some contribution.

Actually my question was mainly, do I need to update the C# code in arunity repo to reflect new changes in artoolkit repo? For example:

It seems the following functions need to be removed in arunity since the source function is removed from artookit:

src/Unity/Assets/ARToolKit5-Unity/Scripts/ARController.cs
1190:                        PluginFunctions.arwUpdateTextureGLStereo((int)_videoTexture0.GetNativeTexturePtr(), (int)_videoTexture1.GetNativeTexturePtr());

src/Unity/Assets/ARToolKit5-Unity/Scripts/ARNativePlugin.cs
141:	public static extern bool arwUpdateTextureGLStereo(int textureID_L, int textureID_R);

src/Unity/Assets/ARToolKit5-Unity/Scripts/ARNativePluginStatic.cs
144:	public static extern bool arwUpdateTextureGLStereo(int textureID_L, int textureID_R);

src/Unity/Assets/ARToolKit5-Unity/Scripts/PluginFunctions.cs
243:	public static bool arwUpdateTextureGLStereo(int textureID_L, int textureID_R)
245:		if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwUpdateTextureGLStereo(textureID_L, textureID_R);
246:		else return ARNativePlugin.arwUpdateTextureGLStereo(textureID_L, textureID_R);

@ThorstenBux
Copy link

@yichuan1118 I believe that the library wasn't updated in the ARUnity repo and because of this the functions should still be available inside the ARUnity part. But I haven't looked into this and might be mistaken.

@yichuan1118
Copy link
Author

@ThorstenBux Yes, after I compiled and copied new libraries to ARUnity, these functions started to throw linking errors in Xcode, probably need to change ARUnity C# code to match changes in artoolkit libraries.

@ThorstenBux
Copy link

Yes, sure. I meant to say that you don't need to compile the sources and can leave everything as is and it should work.

Why did you compile the sources in the fist place?

@yichuan1118
Copy link
Author

I see, the library currently in ARUnity repo has the old calibration server address, causing a slow start. I was trying to build a new library from source so it has the new calibration server address, also it is a good learning experience :)

@ThorstenBux
Copy link

I see 👍 yes that would be a huge contribution right from the start :). Please keep it up and keep sending questions. Will help as good as I can. And please push regularly so that I could pick it up if needed.

@yichuan1118
Copy link
Author

yichuan1118 commented Feb 11, 2018

@ThorstenBux I have started to submit some PRs to fix some of the issue. Quick question:

yichuan1118@47d5796#diff-e74616cb881e7e0fba2ceb2a1bed91f7L343

Here I left a question, could you take a look. Basically why are some of the exported functions for iOS etc. are removed in this PR? This PR seems to be for Android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants