Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's a good 2D graphics drawing API for Windows/C++?

I've been working on a small little application, and I've been using DirectX/3D to draw textures to the screen (all 2-dimensional elements). The API, I find, is pretty easy to use and to incorporate using OOP principles, but I can't help but feel that using DirectX on something this small is insanely over-kill.

I can't seem to find consensus on a good alternative, though. Any suggestions?

EDIT: Native alpha-blending and PNG file support is necessary.

With much first-post love, Jengerer

like image 303
Jengerer Avatar asked Sep 01 '10 18:09

Jengerer


1 Answers

If you need alpha blending you have to use the graphics hardware; the only good way to do that is to use a 3D API similar to how you're doing it now (DirectX or OpenGL). Any alternative (GDI/+ or say, DirectDraw) will not use the full graphics hardware for accelerating blending and will have to perform it on the CPU, greatly reducing performance.

As mentioned, Direct2D is an option also--it is functionally a layer on top of Direct3D that supports more 2D specific functionality as well as excellent text support.

like image 149
Ron Warholic Avatar answered Oct 27 '22 20:10

Ron Warholic