Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm making OpenGL game for Android. Till now i've used only fixed function pipeline, but i'm rendering simple things.

Fixed function pipeline includes a lot of stuff i don't need. So i'm thinking about implementing shaders in my game to simplify OpenGL pipeline if it can make better performance.

Better performance = better battery life, unless fps is limited by software limit, not hardware power.

share|improve this question
Isn't the fixed function pipeline deprecated? Might be an issue in the near future. – David Lively Jun 27 '12 at 16:07
up vote 4 down vote accepted

There isn't actually a question here except in the subject, but improved performance and improved battery life could be totally different things. Also, improved compared to what? Compared to the fixed function pipeline? Compared to complex shaders?

Simple shaders should give a higher framerate (assuming your framerate is limited by gpu throughput rather than screen refresh rate) when compared to complex shaders, which you might consider better performance. That won't necessarily improve battery life though, you could still be using 100% gpu/cpu power, but you will have a higher frame rate because there is less to do each frame.

Compared to the fixed function pipeline... who knows? Many hardware vendors nowadays implement the fixed function pipeline in terms of shaders, so you're just comparing simple vs complex shaders again.

share|improve this answer

I don't have up-to-date figures of smartphone power consumption, but I think that CPU and GPU should be somewhere at the same level. Correct me, if I am wrong.

Generally, trying to optimize parts of your code that rely on performance is always a good thing, not only because you save battery life, but also because you can reach devices with less powerful hardware. I also always encourage people to use OpenGL ES 2.0 / OpenGL 3.0 for games, because the power of shaders is, like you said, to cut down the effort to a minimum and to provide much more flexibility.

But, based on the assumption you are rendering some 2D sprites, I'd say that the GPU is mostly in an idle state. That means that the CPU will possibly have more impact on battery life than the GPU, so you should not expect too positive results here. I'd recommend you try to improve your algorithms running on the CPU before you optimize the ones on the GPU, but I'd use shaders too for the sake of flexibility. At least if you can ignore the devices out there without support for OpenGL ES 2.0 (again, I don't have figures ^^).

share|improve this answer
Thanks for nice answer, but i didn't ask "What should part of game should i optimize for better battery usage". ;) – kravemir Jul 2 '12 at 18:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.