emilk / emilk/egui

A way to use mesh.split_to_u16() with egui_glow()

Open
#2,383 1 comment 0 reactions 0 assignees View on GitHub
feature
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

**Is your feature request related to a problem? Please describe.**
Hello all, I've been on a quest to get this working with a Raspberry Pi 3b which only supports OpenGL ES 2.0 in an EGL context. Long story short, it only supports UNSIGNED_SHORT for the mesh indices, whereas egui_glow seems to be hardcoded with UNISIGNED_INT. Mesh supports split_to_u16() so I was able to fork off egui to add:

```rs
Primitive::Mesh(mesh) => {
for mesh16 in mesh.clone().split_to_u16() {
self.paint_mesh16(&mesh16);
}
}
```

to painter.rs. And then self.paint_mesh16() is the same as paint_mesh except it uses a glow::UNSIGNED_SHORT.

**Describe the solution you'd like**

Ideally egui_glow would support this automatically? Or possibly put it under some feature flag.

**Describe alternatives you've considered**

For now I can just keep a local fork going, this is just for a toy project anyways.

**Additional context**

Thank you for your time!

Contributor guide

Open the contributing guide

Research direction

Start in painter.rs at the Primitive::Mesh handling and the existing paint_mesh entry point. Review the reported split_to_u16() approach and the UNSIGNED_SHORT alternative, then verify that egui_glow can render meshes using 16-bit indices on the described OpenGL ES 2.0 setup without changing the existing path.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.