How to draw a line between anchors on the plane with ARcore without arFragment

前端 未结 1 1725
生来不讨喜
生来不讨喜 2021-01-29 02:48

I\'m building my app around this Agora ARcore Demo based on Google\'s hello_ar_java Sample APP.

This application, capture user\'s taps and check if any planes in the scen

相关标签:
1条回答
  • 2021-01-29 03:32

    You code is not calling your drawLineButton() function, is it? Anyway, it looks like you're trying to use some things from Sceneform (MaterialFactory, ModelRenderable, etc) while doing some pure OpenGL rendering as done in the hello_ar_java.

    Mixing those will result in nothing good since Sceneform uses filament as rendering engine which could use OpenGL or Vulkan. So either go fully with Sceneform or fully with OpenGL (and understand how OpenGL and Android work).

    Now, if you want to continue with hello_ar_java sample, follow an OpenGL tutorial in order to be able to generate a vertex for each anchor and draw them with GL_LINES with the line size you like. Here's a good OpenGL tutorial: https://learnopengl.com/ I recommend going through all the Getting Started section, but just keep in mind that it is OpenGL and Android uses OpenGL ES, there are some differences but the computer graphics principles are the same.

    0 讨论(0)
提交回复
热议问题