/GLPT

GLPT :: OpenGL Pascal Toolkit. A multi-platform library for OpenGL and OpenGL ES

Primary LanguagePascalMIT LicenseMIT

Build Status

GLPT :: OpenGL Pascal Toolkit

An easy to use native pascal toolkit that allows to create and manage OpenGL contexts in a platform independent way. GLPT is available under the MIT license.

Some screenshots on different platforms.







Feel free to submit new screenshots by creating a pull request.

Usage

Using GLPT is easy, you only need to include the GLPT unit and create a window. Then run the event loop and do all your application stuff there. There are numerous examples included to help you to make a jump start.

uses
  GLPT;

  ...

  GLPT_Init;
  window := GLPT_CreateWindow(0, 0, width, height, 'Simple example', GLPT_GetDefaultContext);

  while not GLPT_WindowShouldClose(window) do
  begin
    //do your application and OpenGL magic here

    GLPT_SwapBuffers(window);
    GLPT_PollEvents;
  end;

  GLPT_DestroyWindow(window);
  GLPT_Terminate;

API (v0.1.2) support

API function Linux (X11) Mac OSX (Cocoa) Windows (GDI)
GLPT_CreateWindow
GLPT_DestroyWindow
GLPT_GetBasePath
GLPT_GetDefaultContext
GLPT_GetDisplayCoords
GLPT_GetFrameBufferSize
GLPT_GetLastError
GLPT_GetPrefPath
GLPT_GetScancodeName
GLPT_GetTicks
GLPT_GetTime
GLPT_GetVersionString
GLPT_Init
GLPT_MakeCurrent
GLPT_PollEvents
GLPT_SetCursor
GLPT_SetErrorCallback
GLPT_SetVSync
GLPT_SetWindowShouldClose
GLPT_SwapBuffers
GLPT_Terminate
GLPT_WindowShouldClose

Design considerations

GLPT is planned to be a simple and easy to use library. When working on the code please consider the following;

  • flat API, so no classes and no objects
  • no external dependencies are allowed, also adding FPC units should be considered carefully
  • only OpenGL context handling, no audio, font or UI included to name a few

Contributors

GLPT is made possible thanks to people that are willing to spend their time and lend their skills, helping to code and submit new ideas. The following persons (in alphabetical order) have committed to this project.

  • Darius Blaszyk (daar)
  • Ryan Joseph (genericptr)