Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

psyjax

OpenGL Blending in OpenGL

This topic is 5334 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey folks, I was wondering how much of a speed hit is blending in OpenGL? I ask this because my SDL/OpenGL 2D engine, uses lots of it to get nice smoothly anti-aliased sprites. The way I do it is to simply load everything as sexy alpha-masked .png files :D Works great so far, but then again I have a GeForce Ti4200, and I want my game to run fine on everything down to a GeForce II. So my question is simple, does alpha masking thrugh hardware blending, cause a significant speed hit? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Blending over a large portion of a high res screen will cause signifigant speed hits to fillrate. I would recomend useing the alpha test if you don''t require semi transparency.

"I seek knowledge and to help those who also seek it"

Share this post


Link to post
Share on other sites
That''s simply not true anymore.

Blending used to require a full read from framebuffer, some math, and then a write. However, these days, blending sits in the memory controller, and is very efficient. While it''ll do a bit of a hit to fillrate, compared to non-blended, I wouldn''t be surprised if it''s on the order of 15% in a heavily fillrate bound application, and nothing at all in an application that''s bottlenecked somewhere else (CPU, transform, etc).

If you want to worry about the low end, worry about i845 "Extreme" graphics, which is still being sold. The GeForce II is much faster than those cards, and won''t be a problem for you if you run well on a 4200.

Share this post


Link to post
Share on other sites
Hey,

Thanks for the replys!

I''m targetting at least GeForceII and MX cards. And I do use Alpha_test. Tho alot of my graphics have alpha masks. So I guess I''m just gonna stick to it then

Thanks a bunch!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!