Android:如何调整 GLSurfaceView 的大小,以便可以在外部添加按钮?

发布于 2024-12-25 20:55:47 字数 422 浏览 2 评论 0原文

我有一个 3d 模型查看器,但我想修改它,所以听到一些问题:

(OpenGL ES 2.0)

1.是否可以将 GLSurfaceView 尺寸(高度和宽度)更改为 600 x 800 之类的尺寸并在设备(平板电脑)屏幕上居中?我想使用未使用的区域在外部排列按钮。

2. 是否可以在 XML 中调整 glSurfaceView 的大小?

3. 有没有办法在屏幕顶部设置 XML 布局?

4.是否可以在渲染下设置背景色,使其不全黑?

有关我想要实现的目标的参考,请在 Android 市场上搜索“STL Viewer”。

I have a 3d model viewer, but I want to modify it, so hear are some questions/issues:

(OpenGL ES 2.0)

1. Is it possible to change the GLSurfaceView dimensions (height and width) to something like 600 x 800 and centered on the device (tablet) screen? I want to use the unused area to line buttons around the outside.

2. Is it possible to resize glSurfaceView in XML?

3. Is there a way to set an XML layout on top of the screen?

4. Is it possible to set a background color under the rendering so that it's not all black?

For reference as to what I'm trying to achieve, search "STL Viewer" on the android market.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文