如何在Android模拟器上创建并运行示例Vulkan应用程序? [英] How to create and run an example Vulkan app on the Android emulator?

查看:840
本文介绍了如何在Android模拟器上创建并运行示例Vulkan应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在不购买设备的情况下使用移动Vulkan.

I want to play around with mobile Vulkan without having to buy a device.

如果不支持,请提供证据(例如源代码,Google官方声明).有支持它的计划吗?

If it is not supported, please provide evidence (e.g. source code, official Google statements). Are there any plans to support it?

如果受支持,请提供详细且经过测试的说明,以了解如何运行最小的Hello World Triangle应用程序,包括经过测试的应用程序.

If supported, please give detailed and tested instructions of how to get a minimal hello world triangle app running, including the app you have tested with.

我尝试了 https://github.com/googlesamples/带有Pixel API 25图像的android-vulkan-tutorials/tree/7ba478ac2e0d9006c9e2e261446003a4449b8aa3/tutorial05_triangle (API 25应该支持Vulkan),但会不断出现构建或运行时错误.

I have tried https://github.com/googlesamples/android-vulkan-tutorials/tree/7ba478ac2e0d9006c9e2e261446003a4449b8aa3/tutorial05_triangle with a Pixel API 25 image (API 25 is supposed to support Vulkan), but keep getting build or runtime errors.

我在以下位置打开了一个问题: https://github.com/googlesamples/android-vulkan-tutorials/issues/13 ,但是没有解决方案就被关闭了.

I have opened an issue at: https://github.com/googlesamples/android-vulkan-tutorials/issues/13 but it was closed without solution.

相关:

  • OpenGL ES 2: Does the Android Emulator support OpenGL ES 2.0?
  • OpenGL ES 3: Does the Android emulator support OpenGL ES 3.0?

推荐答案

我怀疑

I suspect this Android Vulkan setup document is as definitive an answer as you're going to find from Google:

开始之前,请确保您已准备好正确的硬件和平台版本.您应该使用支持Vulkan且运行Android API级别为24或更高级别的设备.

Before beginning, make sure you have the right hardware and platform version prepared. You should use a device that supports Vulkan, running Android API level 24 or higher.

请注意,它并不建议使用仿真器作为替代方法,它只讨论正确的硬件和设备.

Note that it does not suggest an emulator as an alternative approach - it talks only about correct hardware and device.

如果您具有跨平台代码库,那么好消息是,在PC上正确运行Vulkan将使您获得在Android上运行Vulkan的方式的大约99%.也就是说,假设您要使用仅限Vulkan的NativeActivity,那么如果您想要具有Vulkan支持和OpenGLES后备功能的Java/Native混合应用程序,则情况会更加复杂,在这种情况下,需要进行大量Android特定工作可以,但您仍然有90%以上专注于PC.

The good news if you have a cross-platform codebase, is that getting Vulkan running correctly on PC will get you about 99% of the way to having Vulkan running on Android. That is, assuming you're going with a Vulkan-only NativeActivity, it gets a bit more fiddly if you want a mixed Java/Native app with Vulkan support and OpenGLES fallback, in that case, there's a chunk of Android-specific work to do, but you're still over 90% there focusing on PC.

这篇关于如何在Android模拟器上创建并运行示例Vulkan应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆