开发者

Faster Background Image in OpenGLES

开发者 https://www.devze.com 2023-03-09 21:45 出处:网络
I\'m writing a game in Android/OpenGLES, and when I use tracevi开发者_运维知识库ew, I see that the time taken to draw my background image (using glDrawTexfOES) is quite huge.

I'm writing a game in Android/OpenGLES, and when I use tracevi开发者_运维知识库ew, I see that the time taken to draw my background image (using glDrawTexfOES) is quite huge.

I understand of course that as the background fills the screen, it should take longer than my other sprites, but is there a faster way to draw the background image. The background does not move or change during the game, so maybe there is a tip or trick to do it faster ?


In most cases, I believe it's faster to do what you want by drawing and texturing a quad(well, or a triangle strip) using a texture buffer. I don't have any solid benchmarks, but it made a pretty big difference for me. Mine was a lot of smaller images(font renderer) rather than one large one, but faster is faster in my experience.

0

精彩评论

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