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.

  • \$\begingroup\$ Isn't the fixed function pipeline deprecated? Might be an issue in the near future. \$\endgroup\$ – 3Dave Jun 27 '12 at 16:07

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.


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 ^^).

  • \$\begingroup\$ Thanks for nice answer, but i didn't ask "What should part of game should i optimize for better battery usage". ;) \$\endgroup\$ – kravemir Jul 2 '12 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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