##### OpenPTC
A standard for fast portable graphics

OpenPTC is a third-generation standard for cross platform low-level graphics access. A lot of design experience has gone into providing one of the cleanest interfaces available for this purpose. After three years of development, public discussion and review, the final standard was released on March 1st 1999. OpenPTC 1.0.

In a nutshell, OpenPTC provides programmers with an array of pixels to draw to and the means to quickly output these pixels to the display device. It also provides some other useful features such as basic keyboard input and a high resolution timer.

If all you want is access to an array of pixels to draw to then OpenPTC is for you. It only takes a few simple lines of code to open a display mode, create a pixel surface, copy it to the display and page flip, compared with the several hundreds or thousands of lines of code required to do the same when working directly with the native platform specific graphics APIs. Best of all, when you code using OpenPTC your graphics code can be ported to other platforms with little or no change.

OpenPTC is designed for high speed graphics applications such as games and demos, and will take advantage of whatever hardware acceleration is available on the target platform for blitting and clearing operations. However, it is important to note that OpenPTC does not provide access to advanced blitting hardware features such as alpha blending or chroma-keying, nor does it provide access to 3d hardware acceleration features such as line, triangle and quad primitive drawing. If this is what you are looking for, I suggest you take a look at OpenGL or DirectX instead.

Implementations of OpenPTC are available for the C, C++ and Java languages on most popular compilers and platforms including DOS, Windows, X11, Linux, and Java. All implementations are freely available under the terms of the GNU Library General Public License. Essentially, this means that applications (even commercial ones), may link to the OpenPTC libraries free of charge so long as any improvements made to the library are submitted back to the OpenPTC community.

#### Stable Distributions

- Windows
- X11
- Java

#### Development Implementations

- DOS
- GGI

#### Future Implementations

- Amiga
- BeOS
- MacOS
- fbdev
- svgalib

#### Documentation

- Introduction to OpenPTC
- OpenPTC C++ Reference Manual
- OpenPTC C Reference Manual
- OpenPTC Java Reference Manual
- OpenPTC Porting Guide

#### Discussion groups on news.scene.org

- coders.ptc - general discussion.
- coders.ptc.announce - public announcements.
- coders.ptc.bugs - submit bug reports.
- coders.ptc.development - development discussion.

#### Links of interest

Essential links

- Doxygen - This excellent C/C++ documentation generator was used to produce the OpenPTC C/C++ Reference Manuals.
- HERMES - An extremely fast and portable graphics library used internally by OpenPTC for pixel format conversion and clearing.
- intel2gas - A useful utility program to convert assembler source files written for NASM to GAS format for easier assembling on unix systems.
- NASM - The Netwide Assembler. A free assembler for x86 systems used by OpenPTC and HERMES.
- scene.org - The demo scene web. Hosts the official OpenPTC mirror site at www.scene.org/ptc and the official OpenPTC news groups.

#### Graphics tutorials

- Introduction to Pixel Theory - Explains the basics of working directly with pixels.
- Introduction to Surfaces - Explains how to work with surfaces and locate individual pixels in surface memory.
- DemoNix Tutorials - A set of tutorials explaining the basics of graphics programming under Unix/Linux.
- FlipCode Tutorial - A tutorial explaining the basics of graphics programming under Win32.
- Nate's Tutorials - Excellent tutorials for beginners wanting to start graphics programming with OpenPTC.

Software that uses OpenPTC

- ClanLib - A cross platform game SDK.
- iXalance/Linux - The Linux port of The Black Lotus demo loader system for Win32.
- Pexl - An extension library aimed at providing functionality not included in OpenPTC.
- Pingus - A free clone of the classic Lemmings game.
- P-Tap - A library aimed at providing cross platform keyboard, mouse and joystick input.
- SparkGL - A fast graphics toolkit designed specifically for 16-bit graphics.
- Titan - A portable image handler that supports TGA, BMP, PCX, PNG and JPEG files.
- WildMag - An open source disk magazine interface.
- ZDoom - An enhanced port of the official DOOM source code to Win32.

Contact ptc@gaffer.org with your comments and suggestions.