开发者

android opengl es background image

Hi I am using opengl to draw sprites for a game. When I draw the level background the game slows down. Is there a way I can draw the background separately? The background is j开发者_Go百科ust a simple image that does not change or animate and as such does not need to be drawn every frame.


Try this:

glSurfaceView = ...
glSurfaceView.setBackgroundResource(R.drawable.my_background);
glSurfaceView.setZOrderOnTop(true);

More details here: https://stackoverflow.com/a/19009278/1186286

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜