Graphics Links and Notes

Graphics Programming Tutorial, from DOS to windows by End of the World Production, LLC. Also a Java section!

Anti-Grain Geometry high quality 2D Vector Graphics. (light weight compared with OpenGL, Microsoft GDI+)

Bugman123.com's Graphics programs OpenGL/C++ AutoLisp → Mandelbrot, torus, uses some Mathematica!

FreeProgrammingResources.com: C/C++ Resources and Graphics Programming

Silicon Valley BSD User Group (SVBUG) Graphics Packages

Alice.org ver 2.0 is out 4/5/2005

Skencil - a vector drawing program

Games Programming Wiki (gpwiki.org): Developement Environments, including minGW

QT Library Reference

Carnegie Melon Graphics

back to top OpenGL

back to top AutoCAD

back to top Tcl/Tk

back to top Win32 GDI Graphics

GDI is Graphics Device Interface

Concepts begin to fall into place; clues from Que Publishing: Learning to Draw Basic Graphics in C++ from the SAMS book, Beginning Game Programming. [Google GetClientRect DrawText]

With #include <windows.h> you have many built-in graphics tools.
This and many other important header files are in
C:\cygwin\usr\include\w32api\.
windows.h itself has many #include < xxx.h> lines, most importantly, #include <wingdi.h> in which is defined
WINGDIAPI BOOL WINAPI LineTo(HDC,int,int); among over 3000 lines...

in C:\cygwin\usr\include\w32api\ is windef.h, also called by windows.h, in which is definition of POINT:

typedef struct tagPOINT {
	LONG x;
	LONG y;
} POINT,POINTL,*PPOINT,*LPPOINT,*PPOINTL,*LPPOINTL;

GDI functions like painting are performed on a device context or DC which is passed into the function via the hDC argument. e.g.,

void GamePaint(HDC, hDC)
{
  MoveToEx(hDC, 0, 0, NULL);
  LineTo(hDC, 50, 50);
}
GamePaint() may be defined in a previous chapter of the book; this illustrates use of some graphics primitives...

Painting Primitive Graphics, such as lines, rectangles, circles, polygons, ovals, and arcs

GDI tutorials

LoneCoyote's Win32-GDI tutorial

informit.com 2003 article on 3D graphics starts with Microsoft GDI 2-D graphics.

Pravin Paratey at geocities: Understanding GDI Elements - A Part of the series on Win32 Programming

WinAPI faq Steve Loughran's utterly unofficial and sporadically accurate list of frequently asked questions about the Win32 API

Sam Blackburn's WFC Windows Foundation Classes. recommended by Steve Loughran's WinAPI FAQ: "one of the most valuable class libraries is free".

2002 Article on Windows Resources, GDI

GDI with MFC

Microsoft Foundation Classes (MFC) in Visual Studio provide Device Context (DC) as an object allowing the following syntax:

  pDC->MoveTo(0,0);
  pDC->LineTo(50,50);

See How to use the MFC Graphical Device Interface (GDI)

There is also GDI+ (gdiplus.dll) in Windows XP with DrawLine instead of LineTo.

GDI+ in C# Tutorial

Amazon has Windows Graphics Progamming by Feng Yuan reprinted March 2006 for $59.99. Here's the HP.com link. You can Read Windows Graphics Prgmg 14 days for free

Charles Petzold's Programming Windows book, 5th ed.

Recommended Books, Tutorial Links

Amazon link to OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 1.4, Fourth Edition

Free on-line Graphics Programming Books

back to top Win32 BGI Graphics

Borland Graphics Interface, may be obsolete, but it's easy to write graphics programs.

BGI Graphics at cs.colorado.edu Borland graphics for Win32 from Konstantin Knizhnik's winbgi shareware