Using the Graphics Primitive Engine Classes

All sample display drivers included with the Platform Builder use the Graphics Primitive Engine classes. While the GPE classes are optional, using them greatly facilitates the process of writing display drivers. If you use the GPE classes, you need only provide the new code necessary to make your display hardware operate correctly and perform acceleration.

The GPE classes require that your display hardware use a flat-frame buffer; that is, the display’s memory must lie in a contiguous memory range. Modifying the GPE classes to use a non-contiguous frame buffer would require significant effort.

    To create a display driver based on the GPE classes

  1. Create a directory for your project.
  2. Copy the files from one of the sample driver directories, such as the S3Trio64 directory, to your project directory.
  3. Replace all device-specific names in those files, such as S3Trio64, with your device’s name.
  4. Change the Config.cpp file so that it places 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 about GPE classes and methods, see the Reference.