Skip to content

Commit 4d2858c

Browse files
committed
refac: move window api out of core & into platform ext (v2.0.0)
1 parent 6351e7e commit 4d2858c

44 files changed

Lines changed: 5297 additions & 4321 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,18 @@ jobs:
211211
- name: Install Dependencies
212212
run: |
213213
sudo apt update
214+
sudo apt install libx11-dev
215+
sudo apt install libxkbcommon-x11-dev
216+
sudo apt install libx11-xcb-dev
217+
sudo apt install libxcb-xfixes0-dev
218+
sudo apt install libxcb-cursor-dev
219+
sudo apt install libxcb-cursor0
220+
sudo apt install libxcb-keysyms1-dev
221+
sudo apt install libxcursor-dev
222+
sudo apt install libxrandr-dev
223+
sudo apt install libxinerama-dev
224+
sudo apt install libgl-dev
225+
sudo apt install libxi-dev
214226
215227
- name: Prep 1
216228
run: |
@@ -231,6 +243,10 @@ jobs:
231243
./pilot_light -a tests_c
232244
((exit 1) || if [ $? = 1 ]; then exit 0; else exit 1; fi)
233245
246+
# - name: SSH into Runner on Failure
247+
# if: failure()
248+
# uses: mxschmitt/action-tmate@v3
249+
234250
- name: Prep 2
235251
run: |
236252
cd $GITHUB_WORKSPACE

docs/changelog.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,17 @@
55
Below is the change log for typical users. Minor and older changes stripped
66
away, please see git history for details.
77

8-
- v0.10.2 (XXXX-XX-XX)
8+
- v0.11.0 (2026-07-14)(camera v1.0.3) -fix camera projection calculation issues
9+
(graphics v2.1.1) -add 3D textures support
10+
-remove "bNonUniformIndexing" from plTextureBinding
11+
-fix metal bindgroup recycle issue #99
12+
-fix metal copy_buffer_to_texture issue with buffer row lengths
13+
-removed native vulkan/metal exposure options
14+
(build v1.5.1) -fix unix "always build" no being honored
15+
(general) -removed experimental backend (& glfw)
16+
(dear imgui) -added pilot light backend
17+
(windows v2.0.0) -moved window api to platform
18+
(starter v2.2.2) -allow staging buffers to be index/vertex buffers
919
- v0.10.1 (2026-06-17)(scripts) -improved new_project script
1020
(starter v2.1.0) -added readback, staging, & resource creation helpers
1121
-added resource manager handling

docs/version.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
v0.10.2 WIP
1+
v0.11.0
22

33
-----------------------------------------------------------------------------
44
Versioning
@@ -36,8 +36,8 @@ the API is complete. It just means we won't break what currently exists.
3636
* Data Registry v1.0.0 (pl.h)
3737
* Memory v1.1.3 (pl.h)
3838
* Extension Registry v1.1.0 (pl.h)
39-
* IO v1.1.1 (pl.h)
40-
* Window v1.2.0 (pl.h)
39+
* IO v1.2.0 (pl.h)
40+
* Window v2.0.0 (pl.h)
4141
* Library v1.0.2 (pl.h)
4242

4343
## Libraries
@@ -67,6 +67,7 @@ the API is complete. It just means we won't break what currently exists.
6767
* Network v1.0.0 (pl_platform_ext.h)
6868
* Threads v1.0.1 (pl_platform_ext.h)
6969
* Virtual Memory v1.0.0 (pl_platform_ext.h)
70+
* Timer v1.0.0 (pl_platform_ext.h)
7071
* Profile v2.0.0 (pl_profile_ext.h)
7172
* Rectangle Packing v1.1.0 (pl_rect_pack_ext.h)
7273
* Screen Log v2.2.0 (pl_screen_log_ext.h)

examples/build_linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Auto Generated by:
4-
# "pl_build.py" version: 1.5.0
4+
# "pl_build.py" version: 1.5.1
55

66
# Project: pilotlight_examples
77

examples/build_macos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
# Auto Generated by:
3-
# "pl_build.py" version: 1.5.0
3+
# "pl_build.py" version: 1.5.1
44

55
# Project: pilotlight_examples
66

examples/build_win32.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
:: Project: pilotlight_examples
33
:: Auto Generated by:
4-
:: "pl_build.py" version: 1.5.0
4+
:: "pl_build.py" version: 1.5.1
55

66
:: Project: pilotlight_examples
77

examples/example_basic_0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pl_app_shutdown(void* pAppData)
9292
//-----------------------------------------------------------------------------
9393

9494
PL_EXPORT void
95-
pl_app_resize(plWindow* ptWindow, void* pAppData)
95+
pl_app_resize(void* ptWindow, void* pAppData)
9696
{
9797
// NOTE: this function is not used here since this example doesn't have a window
9898
}

examples/example_basic_1.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
example_basic_1.c
33
- demonstrates loading APIs
4+
- demonstrates loading extensions
45
- demonstrates creating a window
56
- demonstrates hot reloading
67
- demonstrates keyboard input
@@ -48,6 +49,9 @@ Index of this file:
4849
#include <string.h> // memset
4950
#include "pl.h"
5051

52+
// extensions
53+
#include "pl_platform_ext.h" // plWindowI
54+
5155
//-----------------------------------------------------------------------------
5256
// [SECTION] structs
5357
//-----------------------------------------------------------------------------
@@ -75,6 +79,17 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
7579
// it will be the value returned from this function's first
7680
// call
7781

82+
// retrieve extension registry
83+
const plExtensionRegistryI* ptExtensionRegistry = pl_get_api_latest(ptApiRegistry, plExtensionRegistryI);
84+
85+
// load extensions
86+
// * first argument is the shared library name WITHOUT the file extension
87+
// * second & third argument is the load/unload functions names (use NULL for the default of "pl_load_ext" &
88+
// "pl_unload_ext")
89+
// * fourth argument indicates if the extension is reloadable (should the runtime check for changes and reload if changed)
90+
ptExtensionRegistry->load("pl_platform_ext", "pl_load_platform_ext", "pl_unload_platform_ext", false); // provides the file API used by the drawing ext
91+
92+
7893
// load required apis (stored as globals for convience)
7994
gptIO = pl_get_api_latest(ptApiRegistry, plIOI);
8095
gptWindows = pl_get_api_latest(ptApiRegistry, plWindowI);

examples/example_basic_2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Index of this file:
8181
#include "pl_log_ext.h"
8282
#include "pl_stats_ext.h"
8383
#include "pl_console_ext.h"
84+
#include "pl_platform_ext.h" // plWindowI
8485

8586
//-----------------------------------------------------------------------------
8687
// [SECTION] structs

examples/example_basic_4.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Index of this file:
4444
#include "pl_draw_ext.h"
4545
#include "pl_starter_ext.h"
4646
#include "pl_graphics_ext.h"
47+
#include "pl_platform_ext.h"
4748

4849
//-----------------------------------------------------------------------------
4950
// [SECTION] structs

0 commit comments

Comments
 (0)