Search code examples
opengldirectxgdi

In which situations is it a good idea to prefer GDI over DirectX/OpenGL


I'm new to graphics programming and I'm wondering why I would ever prefer GDI over the hardware accelerated graphics of DirectX/OpenGL?

Are there still good reasons to use GDI?


Solution

  • It ultimately comes down to what you need. If you just need non-real time 2D graphics, GDI will do exactly what you need.

    On the other hand, DirectX and OpenGL take much more work to use and manage (and typically use more system resources), although they allow faster drawing, and 3D.

    Remember, keep it simple, you don't need a full 3D system to draw a couple of circles!