Vuforia: overlaying a texture onto a target instead of the teapot - problems with C++ file location - vuforia

I'm trying to place a texture over a target in Vuforia (similar to this post), but am running into difficulty. I'm using Eclipse Luna, on Ubuntu 14.04.
So far I've done the following:
Installed the Vuforia Samples Project (with ImageTarget, Multi-Targets, User-defined targets, etc. in it) - this works find under normal Java environment.
Installed Android NDK, & setup directory in preferences.
I have added Android NDK support to the Vuforia samples project (via Android Tools menu)
I have built all.
Whilst the JNI directory appears, it only contains VuforiaSamples.cpp. I can't find ImageTargets.cpp as required in this tutorial.
Any ideas what I need to do? Thanks.

It turns out I didn't need to use the NDK. What I wanted to achieve was possible with Java alone.
To achieve this, take a look in the "...SampleApplications.util" package of the Java demo project and duplicate the "CubeObject", calling it something like "MyObject". You can then alter the geometry within this new object class.
To implement your new object class, take a look at the "...Render.java" file. In the rendering method you will see what code to replace with your own code.

Related

Unity: Missing meshes on all mesh filters on Linux

I am having some issues while creating the build for the Linux platform. Everything is working perfectly on Windows on the same branch and Unity version(2019.3.13f1 Professional).
Meshes are missing for all mesh filters in the project on Linux machine. They are not even visible in the inspector.
There was an error for no OpenGL support.
Platform StandaloneLinux64 with device OpenGLCore is not supported with High Definition Render Pipeline, no rendering will occur
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /home/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)
I used Vulkan instead of OpenGL. But the issue persists.
On reloading, an error appears for all meshes:
"Import FBX Errors:
Could not read file abc.FBX. Unexpected file type.
"Inspector Looks like this on selecting the meshes
Besides the OpenGL driver issues, you must also make sure that you do commit the .meta files also in your repository. Internally Unity reference files based on their ids that are located inside these meta files. Without them Unity won't know which external file was assigned to which GameObject and that could also be a cause for not showing the meshes.
However, when you manually drag-and-drop the meshes onto Unity, it recreates the .meta files and assign that to the new GameObject you had just created, which could explain the behaviour you noticed.
I solved the issue. The issues was that I had to do "git lfs pull" instead of "git pull". This may help any other person.

Databinding-Classes aren't generated any more

I had a working project in Android-Studio, including Databinding. That eleminates some possible sources of error. ;-)
Then I decided to get my feet wet with Kotlin and began to migrate some classes from Java to Kotlin.
Unfortunately I also klicked to update Android-Studio to 3.4 in the middle of this process. So now I have many moving parts ...
Now after some editing, when I try to compile my app, the databinding-classes are not generated any more. Usually this is a problem of missing getters or setters or something like this. But currently I have no compiler errors that indicate such problems. Only all the references to my BR. class are red as this class is not generated.
In the layout-files the getters and setters from the data-variable are not shown - so there is a problem already there.
The build-log tells me to check the log for details, but I can not find any log with error-messages that could lead to a solution.
Android-Studio 3.4, mixed Java/Kotlin sourcecode
Besides those missing BR class, I have no other compilation errors at the moment.
I checked the raw gradle output and also tried to run those steps with the more verbose output - no luck.
Maybe this is related:
- I also have problems to edit my existing layouts with constraint-views. Somehow the constraints are read-only.
After some fiddeling around I managed to get one layout back to read-write mode. Not shure what I did to accomplish this ...
- Also I have the problem that Android-Studio "remembers" the last project and mixes the configurations from the last project with that of the current one. To fix this I have to delete the .idea folder in the project ... After that I can work with my project until I change to another or open a second one in parallel ... :-/
In order to get logs I also changed to generate the binding-classes by the compiler instead on the fly by Android-Studio - no luck.
As this is an installation with some history, I also tried to delete the configuration-files from Android-Studio - also no luck.
Clean- and Rebuild Project, Restart Android-Studio, Invalidate Caches ... all that tried without success.
Currently I am out of ideas where to look. Maybe somebody out there has a tip for me?
if you use imports in xml like
<import type="java.lang.Integer"/>
you have to delete it because android studio is imported automatically.
ref :
Just as in managed code, java.lang.* is imported automatically.
Finally I found the source of my problems!
After many attempts to find an error in my code or maybe in Android-Studio (also downgraded to 3.3 and tried the current 3.5 canary version) I decided to strip down the code to the max.
So I created a new project. In that project I created 2 observable classes and copied the minimal code from https://developer.android.com/topic/libraries/data-binding/observability#observable_objects.
I created one class in java and one class in Kotlin (with an index-Number at the properties so that I could see which properties are generated in the BR class).
Only the properties from the Java-class were generated in the BR class, those from the Kotlin class were missing. No error messages besides the missing BR-properties were generated. :-(
With this information I started a new research and finally found, that for Kotlin currently the apply plugin: 'kotlin-kapt' was missing in the project build.gradle file.
Once I added this, also the properties from the Kotlin class were added to the BR class.
Some (older) articles also add kapt "com.android.databinding:compiler:x.x.x" to the dependencies, but with the latest compiler I got null-pointer exceptions. Seems that this component is already referenced somewhere else, because it is not necessary (any more).
I also added this to my other project and now those BR-properties are also present there. So I am confident to have found the answer to my question and can now focus on bugfixing my app.

ActionBarSherlock conflicts with Appcompat

I am trying to do a small test project using ActionBarSherlock library but having the same issue as in this post -> android-support-v7-appcompat has same attrs as actionbarsherlock library
Ref: http://pastebin.com/ERDHsQbe
Has anyone found a solution yet?
Thanks.
remove support-v7-appcompat library from your project, its in build with sherlock .
Then in the styles.xml change parent="Theme.AppCompat.Light" to
parent="android:Theme.Light" .This will be sufficient .
If you are gettin any errors related to android-support-v4 , try and copy the latest android-support-v4 into the Sherlock library folder in your workspace.
I have the same problem since I changed attributes in attr.xml file which is identical to another attributes in support-v7-appcompat library
and changing every thing related to it in the actionbarshelock project manually
I lost much of time but finally I did it
replace your ActionBarSherlock library by this one
https://drive.google.com/file/d/0B-XiEeIClMuTb2t3S0h0d2lsUUE/view?usp=sharing
the only change is in the attr.xml file and it's reflection on the java code and layouts
note : you must be sure that you have only one android-support-v4 library file to avoid jar mismatch

Is directshow.net video input device filter enumeration broken (in newer environments)?

Every example in the directshow.net samples folder (marked "2010-February") compiles fine, and those that play videos from files work great. However, every example that tries to enumerate the FilterCategory.VideoInputDevices always fails to find any of my filters, specifically DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice);
always returns that I have no devices. This same problem occurs for me in every other program that uses directshow.net, like touchless and the various examples on codeplex.
I've got four video input filters installed (1 webcam and 3 screen-capturing filters) and they're found/usable by the graph editor that comes with the Windows SDK and the rl Filter Manager. Both programs list the four filters under "Video Capture Sources" and each Moniker starts with the correct GUID that directshow.net's FilterCategory.VideoInputDevices points to ("860BB310-5D01-11D0-BD3B-00A0C911CE86").
I've tried compiling and using the latest directshow.net dll myself, but nothing changed.
Is there some reason why the wrapper can get the video rendering filters fine but not enumerate video capturing ones? I'm on win7 sp1, 64bit, using visual C# 2010 express. Is something in my environment causing this? I'd gladly handle the change myself if I knew what is causing it.
Thank you for your time.
I copied the code for GetDevicesOfCat into my project and started debugging it. If I handed it any FilterCategory other than VideoInputDevice, it would get most of the filters that GraphEdit lists, but it was still missing some in most of the categories. I guessed that there was some property of the filters that made them unobtainable to my compiled version of GetDevicesOfCat.
It turns out simply switching my platform target to x86 does the trick, though it's not as straightfoward in VS2010 Express (for a fresh install, you'll have to follow the second answer before you do the first):
Change target CPU settings in Visual Studio 2010 Express
The program now successfully enumerates all of my filters.

How can I override a class in J2ME Polish binaries?

I am using a UI component from J2ME Polish. I found a simple bug in the code, and want to quickly fix it but cannot find any build scripts in the download package, although source-code is included.
The problem cannot be solved by extending the class as it involves members with private access.
How should I go about fixing it? Should I simply compile the class in question with Javac or should try to locate build script in their repository?
There is no binary code for J2MEPolish UI library, because these classes are also preprocessed during your application compilation. This is why there is also no build script for J2MEPolish UI part - the resulting binary, if it compiles, would not make any sense :)
If you are using this UI class directly (there is no Polish magic involved) I would suggest to copy it into your own project, make the changes there and you should be just fine.
But there is a small issue. I'm not 100% sure, but Polish build process should be as follows: first your classes are preprocessed and then Polish classes will be preprocessed. If the UI component, that you copied into your project, will stay in the same java package, it could happen that your changes will be overwritten by buggy Polish implementation. You can check it by running the application or looking at the final java code in build directory.
If the overwriting problem happens, then you have two options - move UI class in your project into different package (I'm 99% sure this should be fine if you use it directly) or you need to modify Polish build process, so that it would preprocess Polish classes first and you could overwrite changes done by it.
/JaanusSiim
I know this question has been answered and accepted but an easier method would be to used their built in property (for any one coming here via the magic search engines)
polish.client.source=/projecthome/j2me-polish-source
which is simply a copy of their sources packaged with the installer. You can copy this into your own source tree and thus have version history of your changes.
While JaanusSiim's method might work I would not recommend it as it becomes confusing having de.enough.** packages in your own source tree I normally create a src for my personal source and a src-j2mepolish for their source files this was it is VERY explicit what I have added to the standard versions.

Resources