Luke 10X
9afbedd473
Merge 24b42b7b1c into 389a044cd2
2025-12-19 17:53:59 +00:00
Luke 10X
24b42b7b1c
📦 GLES3 renderer and demo examples using it
...
- **Initialize Window**:
- Successfully created a GLFW window with dimensions 1280x720.
- Set up window hints for OpenGL version and core profile, enabling multisampling, and enabling depth testing.
- **Setup Renderer**:
- Initialized the Clay rendering context with a memory arena and dimensions.
- Set up the measure text and render text functions using stb_image.h and stb_truetype.h.
- Initialized the GLES3 renderer with 4096 texture units.
- Loaded a Roboto-Regular font atlas and set it as the default font for rendering.
- **Main Loop**:
- Called `Clay_UpdateScrollContainers` to handle scroll events.
- Set the layout dimensions and cleared the color buffer and depth buffer.
- Render the Clay video demo layout.
- Swapped the window buffers to display the rendered video.
- **Cleanup**:
- Cleaned up the GLFW window and renderer resources when the application is closed.
This setup provides a basic framework for rendering videos in GLES3 with GLFW, leveraging stb_image.h for asset loading and Clay for the rendering engine.
- Configure GLFW and SDL2 in the main files
- Fix the video bugs in the main file
🪝 Stb dependency to be managed with cmake in examples
💀 Allow clients to configure headers, also expose Gles3_Renderer through
header-only mode
🧹 Quality of life: automatically set screen dimensions to renderer
Before users had to set them manually
📚 **🎨 Renderers/GLES3:** Improve round-rectangle clipping with uniform border thickness
Implemented improvements to the renderer for GLES3, ensuring better handling of rounded rectangles with borders, making the layout more visually appealing.
- Added two new functions `RenderHeaderButton1`, `RenderHeaderButton2`, and `RenderHeaderButton3` for creating header buttons with different styles.
- Updated the `CreateLayout` function to include these new buttons in the right panel.
- Added a TODO note for handling the outer radius calculation, as it seems to be incorrect in the current implementation.
- Replace `bl_i + B` and `br_i + B` with `bl` and `br` respectively to simplify the code.
- Simplify the logic for checking pixel inside the inner rounded rect by directly using `innerLocal`.
📥 Change borders to be inset
- Fixed incorrect border calculation in the shader.
- Added support for inset borders by adjusting the boundary calculations based on `CLAY_BORDERS_ARE_INSET`.
This change also gives the renderer more choice in handling different border styles.
🏗️ CMake builds for GLES3 renderer examples
2025-12-19 12:52:38 -05:00
Isaiah Paget
389a044cd2
[Bindings/Odin] Fixed incorrect assignment in README example ( #533 )
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
Odin Bindings Update / check_changes (push) Has been cancelled
Odin Bindings Update / build (macos-latest) (push) Has been cancelled
Odin Bindings Update / build (ubuntu-latest) (push) Has been cancelled
Odin Bindings Update / commit (push) Has been cancelled
2025-12-05 14:23:56 +11:00
github-actions[bot]
2749e56e7e
[bindings/odin] Update Odin bindings
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
Odin Bindings Update / check_changes (push) Has been cancelled
Odin Bindings Update / build (macos-latest) (push) Has been cancelled
Odin Bindings Update / build (ubuntu-latest) (push) Has been cancelled
Odin Bindings Update / commit (push) Has been cancelled
2025-11-26 04:12:20 +00:00
TotallyGamerJet
0c8e300524
[Core] Update Clay_OnHover to take void* instead of uintptr_t ( #334 )
2025-11-26 15:11:34 +11:00
Yang Zhang
7a9a976d42
Remove unneeded semicolon so that Odin compiler won't fail with -strict-style -vet ( #514 )
2025-11-26 13:38:34 +11:00
Rats
c13feb2428
[Bindings/Odin] Improve example text measurement function ( #541 )
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
Odin Bindings Update / check_changes (push) Has been cancelled
Odin Bindings Update / build (macos-latest) (push) Has been cancelled
Odin Bindings Update / build (ubuntu-latest) (push) Has been cancelled
Odin Bindings Update / commit (push) Has been cancelled
2025-11-12 09:46:20 +11:00
Daniel Mayovskiy
fd97d8179e
[Renderers/termbox] fixed horizontal text culling bug ( #525 )
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
Odin Bindings Update / check_changes (push) Has been cancelled
Odin Bindings Update / build (macos-latest) (push) Has been cancelled
Odin Bindings Update / build (ubuntu-latest) (push) Has been cancelled
Odin Bindings Update / commit (push) Has been cancelled
2025-10-23 12:58:39 +11:00
Daniel Mayovskiy
7216815536
Fixed termbox2 demo build, added scroll functionality ( #523 )
2025-10-23 12:57:11 +11:00
Thomas Anderson
83129995f7
[Examples/official-website] updated paths in build.sh
2025-10-23 12:56:20 +11:00
Daniel Mayovskiy
588b93196c
[Renderers/termbox] Fixing termbox2-image-demo build error ( #524 )
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
Odin Bindings Update / check_changes (push) Has been cancelled
Odin Bindings Update / build (macos-latest) (push) Has been cancelled
Odin Bindings Update / build (ubuntu-latest) (push) Has been cancelled
Odin Bindings Update / commit (push) Has been cancelled
2025-10-02 11:21:11 +10:00
github-actions[bot]
382dcde89d
[bindings/odin] Update Odin bindings
2025-10-02 01:17:05 +00:00
elmfrain
c6442bd192
[Bug Fix] Multiple Floating Elements Cannot Use Clay_Hovered() ( #461 )
...
Co-authored-by: Nic Barker <contact+github@nicbarker.com>
2025-10-02 11:14:17 +10:00
Nic Barker
7874cdb085
Fix README update
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
Odin Bindings Update / check_changes (push) Has been cancelled
Odin Bindings Update / build (macos-latest) (push) Has been cancelled
Odin Bindings Update / build (ubuntu-latest) (push) Has been cancelled
Odin Bindings Update / commit (push) Has been cancelled
2025-09-29 13:27:40 +10:00
github-actions[bot]
37675089e3
[bindings/odin] Update Odin bindings
2025-09-16 01:40:04 +00:00
Nic Barker
1cbc56cbf2
[Core] Remove ID from element declaration struct and split clay macro into CLAY and CLAY_WITHID ( #492 )
2025-09-16 11:39:07 +10:00
github-actions[bot]
0d6969c8c3
[bindings/odin] Update Odin bindings
2025-09-08 02:15:33 +00:00
Víctor López
958d684b3c
[Compilers] Fix struct with default initializer not using CLAY__DEFAULT_STRUCT ( #498 )
2025-09-08 12:14:05 +10:00
Rats
f55513493b
[Bindings/Odin] Fix ID procedure ignoring index ( #496 )
2025-09-08 12:13:00 +10:00
github-actions[bot]
dabf8214a8
[bindings/odin] Update Odin bindings
2025-09-08 02:12:08 +00:00
fgungor
747643e84e
[Core] fix unused extra macro param in CLAY_SID_LOCAL ( #505 )
2025-09-08 12:10:10 +10:00
rivten
5a0d301c60
[Renderers/Sokol] allow usage of images with sokol renderer ( #489 )
...
Co-authored-by: Hugo Viala <h.viala@ganacos.com>
Co-authored-by: Andrew Sampson <1297077+andrewmd5@users.noreply.github.com>
2025-09-08 11:35:18 +10:00
Andrew Sampson
1bc5105272
[Renderers/Sokol] Text measurement/rendering width mismatch in sokol_clay ( #480 )
2025-08-19 12:14:13 +10:00
github-actions[bot]
61bab7bba6
[bindings/odin] Update Odin bindings
2025-08-14 23:38:20 +00:00
Nic Barker
7f767d2301
[Core] Increase the default scroll container limit to 100
2025-08-15 09:37:23 +10:00
Daniel S Jeremiah
2b192409b9
[Documentation] -- updated README ( #475 )
2025-08-14 10:02:23 +10:00
github-actions[bot]
91c6d05774
[bindings/odin] Update Odin bindings
2025-07-15 23:32:23 +00:00
Nic Barker
4aa3d75bef
[Core] Split base ID hash from index ID hash
2025-07-16 09:30:54 +10:00
Hayden Gray
9d38edb989
[Bindings/Odin] SizingFit and SizingGrow default parameters ( #462 )
2025-07-09 09:07:10 +10:00
github-actions[bot]
516e85bdfe
[bindings/odin] Update Odin bindings
2025-07-01 23:47:56 +00:00
Tomás Ralph
0022d12c0c
[DebugTools] Fix aspect ratio display, closes #449 ( #451 )
2025-07-02 09:46:12 +10:00
Nic Barker
d9d0b6c37b
[Core] Fix incorrect percentage sizing of floating elements
2025-07-02 09:37:38 +10:00
Hayden Gray
8dfcc944fa
[Bindings/Odin] - add CI to update binding libs ( #452 )
2025-06-27 15:05:13 +10:00
Mivirl
a9c1f9a8a7
[Renderers/termbox2] Termbox2 renderer & examples ( #419 )
2025-06-27 08:26:38 +10:00
Nic Barker
281f961e3d
[Bindings/Odin] Update Odin bindings
2025-06-24 13:57:15 +10:00
Nic Barker
3433a53a8e
[Core] Fix an alignment bug for scrolling container contents
2025-06-24 13:55:20 +10:00
wolfee
4a91cac1b2
[Renderers/SDL3] Fix border position calculated incorrectly ( #446 )
2025-06-23 10:43:08 +10:00
Nic Barker
ff7917798c
[Core] Avoid calling measure text function with length zero
2025-06-23 10:10:13 +10:00
wolfee
f97cb9ea10
[Renderers/SDL] Font sizing is ignored ( #444 )
2025-06-23 09:30:14 +10:00
Nic Barker
74f0ffbe26
[Renderers/Cairo] Fix outdated image API usage in cairo example
2025-06-23 09:16:41 +10:00
Nic Barker
a5e212b8de
[Renderers/HTML] Fix a mouse overlap bug with external scroll handling
2025-06-20 10:59:44 +10:00
Nic Barker
0835781602
[Bindings/Odin] Update Odin Bindings
2025-06-18 09:55:32 +10:00
Nic Barker
13ecd80ee5
[Renderers/SDL3] Fix up outdated API usage in SDL3 example
2025-06-18 09:54:27 +10:00
Nic Barker
c524485c46
[Core] Fix case where there could be 64 extra bytes of padding between arrays in clays internal arena
2025-06-17 13:07:56 +10:00
Nic Barker
b9e27178c0
[Core] Align base arena memory to 64 byte cache line
2025-06-17 10:32:30 +10:00
Nic Barker
6f10bf4b3d
[Core] Remove erroneous break statement when using external scroll handling
2025-06-13 10:35:31 +10:00
Nic Barker
adb1bd620a
[Examples/clay-official-website] Fix links on official website example
2025-06-13 09:59:07 +10:00
Nic Barker
dca9f60a6c
[Core] Add objective-c support
2025-06-12 12:16:29 +10:00
Nic Barker
3ccfa0f8fa
[Core] Fix a bug where extra child gap was added to the dimensions of clipped containers
2025-06-11 10:41:01 +10:00
Nic Barker
35b45d939b
Fix some typos in the readme
2025-06-11 10:15:51 +10:00