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
精彩评论