AndEngine应用Transparancy至AndEngine查看 [英] AndEngine Applying Transparancy to AndEngine View

查看:229
本文介绍了AndEngine应用Transparancy至AndEngine查看的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发与andEngine在Android的帮助下比赛。结果
我已经定义布局XML背景,试图把一些组件使用AndEngine在屏幕上。结果
但AndEngine捕获区域是不透明的。由AndEngine中捕获的所有背景变黑。结果
我使用org.andengine.opengl.view.RenderSurfaceView在code XML和LayoutGameActivity。

I am developing a game with the help of andEngine in Android.
I have defined background in layout xml and trying to put some component on the screen using AndEngine.
But the AndEngine captured area is not transparent. All the background captured by AndEngine goes black.
I am using org.andengine.opengl.view.RenderSurfaceView in xml and LayoutGameActivity in code.

在此先感谢你会花想帮助我的时间。

Thanks in advance for the time you will spend trying to help me.

推荐答案

在看一看<一个href=\"https://github.com/nicolasgramlich/AndEngineAugmentedRealityExtension/blob/GLES2-AnchorCenter/src/org/andengine/extension/augmentedreality/BaseAugmentedRealityGameActivity.java\"相对=nofollow> BaseAugmentedRealityGameActivity 从<一类href=\"https://github.com/nicolasgramlich/AndEngineAugmentedRealityExtension/blob/GLES2-AnchorCenter/\"相对=nofollow> AndEngineAugmentedRealityExtension 。它适当的表面设置了透明背景。

Have a look at BaseAugmentedRealityGameActivity class from the AndEngineAugmentedRealityExtension. It does the proper surface setup for a transparent background.

作为一个工作示例,请尝试<一个href=\"https://github.com/nicolasgramlich/AndEngineExamples/blob/GLES2-AnchorCenter/src/org/andengine/examples/AugmentedRealityExample.java\"相对=nofollow> AugmentedRealityExample的 href=\"https://github.com/nicolasgramlich/AndEngineExamples/blob/GLES2-AnchorCenter/\" rel=\"nofollow\"> AndEngineExamples ,该利用这一点。

As a working example, try the AugmentedRealityExample of the AndEngineExamples , which makes use of this.

这篇关于AndEngine应用Transparancy至AndEngine查看的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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