can i use android views(such as webview or layout) as texture in cloud reco sample,so far i found bitmap and video is used as texture.
To add on to this question:
Instead of using webview as texture for openGL drawing, is there another way to draw/position webview so that it align with image target, and also keep the normal webview behaviors (such as click, swipe, etc.)?
No, that won't be possible, because to have that behaviour (click, etc.) you would need to attach the view/layout to your Activity content view (i.e. render the view in 2D like in a usual Android application), so that Android can traverse your view and analyzie your touch inputs.
If you want to achieve buttons functionalities on the OpenGL texture in 3D, you would need to implement your own raycasting algorithm, but that's a far more complex approach.
it should be perfectly possible to do what you ask for;
if you take a look at the file "CloudReco.java", you should be able to find this code (and its surrounding code):
Bitmap bitmap = Bitmap.createBitmap(mTextureSize, mTextureSize, Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(bitmap);
This shows precisely how to build a Bitmap out of a custom Android view/layout (which is made up of several sub-views, btw); the Bitmap can then be used to build a texture (this is also shown in the sample code), like any other Bitmap.
Are you sure you want to delete this message?
Are you sure you want to delete this conversation?