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)
- Question: PushStyleColor HOT 2
- Clear InputText box after pressing Enter HOT 2
- impossible to compile a directx12 or any other example on windows 11, vs code, mingw, gcc for windows installed. does someone manage to launch the example_win32_directx12 for instance ? HOT 1
- Window content is blurry on Wayland with fractional scaling HOT 2
- Design rational for requireing a non-empty string as window title HOT 3
- Vulkan 1.3.280.0 validation error HOT 2
- Auto resize window with an auto-size combo will expand indefinitely HOT 1
- Auto-resize functionality with Tables API HOT 4
- Selectable in nested table HOT 2
- Make sure InputText is selected without breaking buttons HOT 3
- Combo jitters inside Table when _SizingStretchProp is set HOT 4
- How to assign different window paddings in one window? HOT 1
- OpenGL Polygon Mode warning in Windows Opengl ES 3.0 HOT 4
- Image buttons - loop - no response - always false HOT 2
- Work around for peristent Centos/RHEL GLFW mouse offset issue? HOT 1
- ProgressBar with fraction == NaN leads to gigantic allocation HOT 1
- Resizing Widgets with SDL and Ogre HOT 1
- ImGui resizes itself to git content when setting size to 0. HOT 3
- How to set the clipboard functions to default ImGui implementation? HOT 5
- More than one BeginTabItem()s crashes program HOT 1
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.