Thread: GDI

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    127

    GDI

    How good is GDI for making games?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by herWter View Post
    How good is GDI for making games?
    Depends on what games... It's not "meant" for games, but for sure you could use it to create a Tetris/PacMan/Space Invaders/Poker/BlackJack type 2D game without too much difficulty.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    GDI (unless we're talking about Vista, I think) is NOT hardware accelerated (afaik) and is therefore a poor choice of API for games.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Elysia View Post
    GDI (unless we're talking about Vista, I think) is NOT hardware accelerated (afaik) and is therefore a poor choice of API for games.
    It can be if the driver implements it - but it is also perfectly possible to write a driver that performs only the two required BitCopy operations, and punt everything else back to the GDI software solution. [You also need to "initialize" the driver and close it and a few other simple functions to make a complete but minimal windows graphics driver].

    However, I do admit that GDI is not necessarily HIGHLY accelerated in modern graphics drivers, because it's generally "fast enough" through the a trivial implementation that implements many of the basic operations with HW acceleration, but not all of them.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Windows GDI vs. Java Graphics
    By Perspective in forum Windows Programming
    Replies: 7
    Last Post: 05-07-2007, 10:05 AM
  2. GDI object lifetime and C++ object lifetime
    By VirtualAce in forum Windows Programming
    Replies: 4
    Last Post: 06-16-2006, 05:26 AM
  3. opengl, or gdi?
    By n3v in forum Game Programming
    Replies: 25
    Last Post: 05-21-2006, 05:02 PM
  4. Whats Peoples Problem With the GDI?
    By MicroFiend in forum Game Programming
    Replies: 6
    Last Post: 07-28-2003, 07:52 PM
  5. Double buffering in GDI -- easy?
    By fusikon in forum Game Programming
    Replies: 17
    Last Post: 02-15-2003, 10:03 PM