Using GPE classes

The sample display driver uses the Graphics Primitive Engine (GPE) classes. While the GPE classes are optional, using them greatly facilitates the process of writing display drivers. If you use the GPE classes, you only need to provide new code necessary to make your display hardware function correctly and to perform acceleration.

The GPE classes require that your display hardware uses a flat frame buffer. That is, the display's memory must lie in a contiguous memory range. Modifying the GPE classes to use a discontiguous frame buffer would require significant effort.

To create a display driver based on the GPE classes, use the following approach:

  1. Create a directory for your project
  2. Copy the files from one of the sample driver directories, for example the S3Trio64 directory, to your project directory.
  3. Globally replace the device-specific name in those files, such as "S3Trio64", with your device's name.
  4. Change Config.CPP so that it puts your display device in a linear frame-buffer mode.
  5. Disable all hardware-specific acceleration:
  6. Build and test this non-accelerated driver.
  7. Add your own hardware acceleration code.

For more information see GPE Classes and Methods.