https://github.com/daar/glpt
GLPT :: OpenGL Pascal Toolkit. A multi-platform library for OpenGL and OpenGL ES
https://github.com/daar/glpt
freepascal linux macosx opengl opengles pascal toolkit unix windows
Last synced: 29 days ago
JSON representation
GLPT :: OpenGL Pascal Toolkit. A multi-platform library for OpenGL and OpenGL ES
- Host: GitHub
- URL: https://github.com/daar/glpt
- Owner: daar
- License: mit
- Created: 2018-09-23T12:30:27.000Z (over 6 years ago)
- Default Branch: GL-version
- Last Pushed: 2022-06-01T21:51:49.000Z (almost 3 years ago)
- Last Synced: 2025-03-14T19:23:23.400Z (about 2 months ago)
- Topics: freepascal, linux, macosx, opengl, opengles, pascal, toolkit, unix, windows
- Language: Pascal
- Homepage:
- Size: 205 KB
- Stars: 33
- Watchers: 5
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/daar/GLPT)
# 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](https://en.wikipedia.org/wiki/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 hereGLPT_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_GetProcAddress ||
|
|
| 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)