flutter: How to use texture on Linux - flutter

I want to integrate OpenGL in Flutter project. I find Texture widget seems to be the answer but all the examples I found is for Android or iOS. I saw texture is supported in Linux engine too. But I can't find any tutorial. Let's say I've create a triangle in native OpenGL C++ code. Flutter texture widget requires a texture ID. How can I bind this ID to OpenGL context so I can display this triangle in texture widget?

Related

Flutter UI widgets in Unity 3D engine

I am looking for support which can render the flutter widgets inside unity 3d engine.
This will be helpful to utilize in our current flutter application and for building 3D applications.
I am new to flutter it will be helpful if anyone can suggest me how I can achieve this with flutter API or Flutter Engine.
The other option is UIWidgets. Version 2.0 debuts for preview recently.
https://github.com/Unity-Technologies/com.unity.uiwidgets
The sample project looks impressive:
https://github.com/UnityTech/ConnectAppCN
You may not be able to render flutter widgets in unity but surely the other way around.
Check out flutter_unity_widget which allows you to embed Unity game scenes in flutter.
And this Medium article might be helpful - Unity 3D in Flutter

Display PNG or Image with ARCore and Unity

I'm trying to display a image after ARCore displays the overlay on the detected marker but I'm not sure how to start.
I saw this thread here but the answer and person was using Android Studio. How would you do it in Unity?

Displaying 3D text in real world using Augmented Reality

ARKit provides a framework to display 3D text in real world using augmented reality. This video explains the same:
Is there a similar mechanism to do the same using Unity and Vuforia augmented reality support??
I tried displaying 3D text, but it simply gets rendered as a 2D text.
You can do this with the standard UI Text component. Use BaseMeshEffect to obtain the Mesh and vertices of the Text component then extrude it outwards. You now how have a 3D Object. You may need to change the material to standard material.
If you can't implement this then use an existing plugin. The Simple Helvetica plugin can do this and it's free on the assetstore.

Unity- Photosphere Photo Viewer for Google Cardboard

I am trying to build a Photosphere-like application with Unity3D and use it along with Google cardboard.
I need to load different panoramic view photos and be able to view them stereoscopically, by using the Cardboard goggles.
I am having problem to use the pano images and render it into stereoscopic view in Unity.
Any suggestions will be gratefully received.
Simplest solution that I can give to you:
A. Install your Unity Pro with Android Pro plugins, setup
Cardboard SDK For Unity, install Android Build tools and SDK.
B Setup Skybox
Get a stereoscopic panorama image (Might take a while to load the image as it is a high resolution image).
In Unity, import the image, change the Texture Type to Cubemap. Select the Mapping as Cylindrical (Lat and Long).
Create a Material, change the Shader to Skybox/Cubemap.
Assign the texture to the material.
In Unity 5 Pro topbar, select Window -> Ligthing, drag the material to the Skybox property. In this step you can do it programmatically. Combine these steps with the Cardboard assets and game objects. Voila, you've made a VR panorama stereoscopic Cardboard app! The whole setup is just take out your five minutes(excluding setup your tools :D).
If you're familiar with Unity, you know exactly what to do on my instructions. If you stuck at somewhere in my steps, feel free to ask me. Happy coding :)
Extra tips:
You can make the large textures files into Asset Bundles, act like a dynamic content which is stored in the server. Your app is just simply a small-size empty app. When app launches, request and download the asset bundles from server then manipulate the textures. :)
Super extra tip: Don't forget to generate asset bundles under Android Build Settings. If not, your textures will be corrupted when the bundle is downloaded to Android phones.
Make a sphere, write a shader so that it is not back culled and it can be seen from the inside. Use the pano image as a texture on the sphere. Place a VR camera rig in the center of the sphere. If you want true stereo, create two such spheres with separate textures for the left and right eye. Place the spheres at the lcoations of the cameras in the rig. Use layer culling so that each camera only sees the proper sphere.

Qualcomm SDK customization?

I am trying to edit multi targets and image targets sample app of qualcomm sdk so that instead of using openGL , I can only overlay UIKit contents such as buttons text etc just for a simple demo. But I am unable to do so till now.
Please guide me where to make any changes or how to go about it?
I have also referred to the forums and tried to examples but they all are using openGL which i want to get rid of.
Please help me out
The main duty of the QCAR is to give you a 4x4 matrix called ModelView matrix with which you can superimpose your graphics. This is an OpenGL matrix and I don't think that you would be able to use that matrix in UIKIT.
If you only want to overlay some UIs stuff when a target is detected then you don't need that matrix. But the UIs will be on the screen in 2D (not on the target image in 3D scene) and tha't not AR at all.
Another option is to incorporate a rendering engine with QCAR to avoid using pure OpenGL ES APIs. For iPhone I think OpenFramework should do the business.