如何显示带有立方体的按钮(在 android 上用 openGL es 制作)?
我是 android 和 openGL ES 的新手。我已经使用 opengl 创建了一个多维数据集,现在我想通过按钮添加求和功能。但问题是,如果我将按钮添加到 main.xml 文件中,一旦立方体出现,它们就不可见。 我需要知道如何查看窗口中显示的带有立方体的按钮。
I am new to android and openGL ES. I have created a cube using opengl and now i want to add sum functionalities through buttons. But the problem is if i add buttons to my main.xml file, they are not visible once cube appears.
I need to know how can i see buttons with the cube being displayed in window.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要将 glsurfaceview 添加到容器中,然后在保存 glsurfaceview 的容器顶部添加一个带有按钮的容器。我以前也这么做过。
这是两个容器。
第一个容器包含 glsurfaceview 和第二个容器。
第二个容器将容纳按钮。
我没有指定容器的名称,因为也许当您阅读本文时,每个当前容器都将过时。
You need to add your glsurfaceview to a container then add a container with buttons on top of the container holding the glsurfaceview. I've done that before.
So that's two container.
The first one holds the glsurfaceview and the second container.
The second container will hold the buttons.
I don't specify a container's name because maybe by the time you read this, every current container will be obsolete.