# gdi - out of date?

## Recommended Posts

hi! isnt windows programming with the gdi out of date? i want to start with game programming in windows biut i dont know if i should use the old gdi or the new .net gdi+?

##### Share on other sites
DontBeAfraid    122
You can use them both.... Use whatever does the job you need done better.... MSDN will return results from both when you search for certain methods.

##### Share on other sites
d000hg    1199
GDI was kindof out of date when it first arrived in terms of decent game/graphics programming. However it's fine for simple things, as the previous poster said look at what you want to do and see if GDI can provide that. My instinct would be to go with the new for future knowledge, and I believe XP has GDI+ - confirm somebody?

##### Share on other sites
Monder    993
Longhorn is meant to have an entirely new interface for drawing windows codenamed Avalon which uses DX for hardware accleration so you can do all kinds of cool stuff with it. However this is aparently going to be cut to meet the 2006 Longhorn release date and will be added in a later patch.

As for what to use now there's nothing wrong with GDI apart from it ain't really that fast, it's fine for stuff such as solitaire and minesweeper (and probably simple games like breakout, pong and tetris) but personaly I wouldn't bother with it. Just use something like DirectX, OpenGL, SDL or Allegro.

##### Share on other sites
Oluseyi    2116
GDI+ is not .NET. It predates .NET by a couple of years. Furthermore, GDI+ has that JPEG vulnerability (which has since been patched).

Neither GDI nor GDI+ is really well-suited to game programming. While GDI+ does provide some measure of acceleration and an object-oriented interface as well as some new features, its performance is not enough for fast-paced action games. If you have a control panel that doesn't need blinding performance, even if the viewport does, you can still use either one, though.

##### Share on other sites
Alpha_ProgDes    6936
well you could use WinForms (though you need the SDK/API and .NET running on your machine) For right now as I've recently read on MSDN, that's supposed to be the successor to GDI/GDI+ until Avalon.

(note: on MSDN, Avalon and WinForms seems to be able to do the same thing. only real difference is that you can use XAML if you're using Avalon.... correct me if i'm wrong, thanks.)

##### Share on other sites
Onemind    265
If you want to make a word processor or a spread sheet, then GDI is hands down the best API. The GDI library was designed to give designers an easy, standard way to implement fonts and images with their application. Most apps don't need all the Pixel-Shaded power in DX and OpenGL - they just want to show a splash screen when the program loads, and draw a few icons.

##### Share on other sites
Pete_    198
Quote:
 Neither GDI nor GDI+ is really well-suited to game programming. While GDI+ does provide some measure of acceleration and an object-oriented interface as well as some new features, its performance is not enough for fast-paced action games.

Interesting, several years ago I wrote a very fast-paced 2d shooter with pure GDI. It ran fine on an old 400MHz K6-2 laptop at 800x600. It didn't really have fancy graphics, but they did the job and looked pretty good, too. This was with VC6 Standard, so no optimizing compiler either.

I would say that GDI(+) is not very suited to graphics programming -- but there's a big difference between that and game programming, IMHO. Games only need just enough graphics to be playable yet not be distracting while playing them.

- Pete

##### Share on other sites
Daichi    122
GDI is more then good enough to start out with Game programing on Windows. Go make Tetris, Pong, or Brickles. GDI should be fine.

And when you wanna make a game that needs more power, go look into DirectDraw 7 as it intergrates fairly well with existing GDI code till you replace your the code with something better.

-Daichi

##### Share on other sites
johnnyBravo    100
You could use OpenGl, even though I started with GDI, and then learned direct3d, and then opengl,but I think Ogl wouldn't be very hard to learn the basics, and it can rotate 2d images etc for you easily.

Even direct3d is easy to learn, you could use their sprite class for alot of things

##### Share on other sites
alnite    3438
You don't have to use GDI/GDI+/DirectX to make games for Windows. I recommend SDL or Allegro.

##### Share on other sites
ZedFx    176
use gdi not gdi+ for now, although it has its quirks its fairly straight forwards for "windows"

## Create an account

Register a new account