Comments (4)
Typically you can iterate over the vertices and "convert" them. For a few thousands vertices per frame the cost is minor. But it an excellent idea - what I'll do is that I'll add a #define to disable the ImDrawVert structure definition and you can provide yours. It won't handle every case but some of them. Make it more likely that you can just memcpy.
from imgui.
I looked into it today, was thinking adding
#define IMGUI_DONT_DEFINE_IMDRAWVERT_STRUCT
However there is the problem that imconfig.h is included before ImVec2 is defined.
Solutions I can think of now:
- Change it to force the user to declare the structure itself as a #define,
- Introduce a second "config" file included at the end of imgui.h
- Allow for a few hardcoded ordering selected via a define - I think it misses the point a little, being only half-flexible when you want to be fully flexible.
All of those are quite awkward! Don't know what to do yet.
from imgui.
Done in 191e17e
You have to declare a macro called IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT that develop to the struct type.
from imgui.
Thanks!
from imgui.
Related Issues (20)
- No scrolling region or selectable items inside Child HOT 3
- Can't write in any field. (1.90.5-docking with SDL3) HOT 1
- `BeginGroup`/`EndGroup` with table inside reports incorrect item size
- Delay in Combo Popup Opening with glfwWaitEventsTimeout HOT 4
- Where's the binaries? HOT 4
- Mouse scrolling not working HOT 6
- Imgui community HOT 1
- Rendering vertices with the D3DPT_LINESTRIP type. HOT 1
- Can't access some stuff from imgui.h HOT 1
- Suggestion: Consider Adding Title Bar Text to Popups HOT 2
- SDL3 Multi-Viewports not creating windows when main window is hidden
- Recommended way to expand / collapse tree nodes with keyboard shortcuts? HOT 3
- VuIkan: invalid Dynamic Rendering functions from the Instance-level loader HOT 3
- Text Bottom Padding Bug HOT 1
- Power savings & hardware usage HOT 3
- Add RGFW backend implementation HOT 2
- Text wrapping: how does it work? HOT 1
- ImDrawList rects aren't perfect HOT 6
- Running ImGui app on Arm Processor (Allwinner H3 with mali 400 -> orangepi one) HOT 1
- Can no longer use ctrl shortcuts in InputText's as of v1.90.6 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgui.