Omar
@ocornut.bsky.social
3.3K followers 65 following 360 posts
programmer of things and stuff. dear imgui / the dragon’s trap / dreams / tearaway / pixeljunk shooter / soul bubbles / meka Paris, France https://www.miracleworld.net
Posts Media Videos Starter Packs
ocornut.bsky.social
People are using native WebGPU for debugging web engine I presume.
ocornut.bsky.social
Thanks I will check them out. The maintenance of that backend has been daunting partly because there’s no easy setup for Dawn, eg if we want to provide a build script that relies on it.
ocornut.bsky.social
Perhaps it is a failure of my part that I haven't grown this project to be a 10 people thing. I'm clearly an opinionated bottleneck, that comes with pros and cons. But I've learned to be meticulous about details. It pains me to see pull request full of lack of attention but its hard to blame people.
ocornut.bsky.social
I suppose bounties would work on larger funded project + well-defined technical tasks. But much of my work is _designing_ things, meaning many iterations until it's right. Hard & maybe dangerous for quality if those tasks are precisely scoped. It mostly needs time involvement + caring about details.
ocornut.bsky.social
I don't believe in it very much in term of community dynamics. It's not like I'm over funded to head into becoming a manager. Also in my experience people work on the tip of the iceberg, require heap of feedback from me & then I get to maintain it for 5+ years. I think bounties would augment this.
ocornut.bsky.social
I once paid a recurring contributor and he pretty much lowered his general involvement from that moment. It's quite tricky to deal with that the right way.
ocornut.bsky.social
In theory I would happily pay people for specific/occasional quality work on topics I'm not good at, but it's not easy to find the right people and get them involved. Also it is simultaneously right but dangerous if I advertise paid work, in terms of how it might bias other contributions.
ocornut.bsky.social
wgpu-native provides binaries but Dawn (Google's WebGPU implementation) doesn't, and it's one of those projects that drags 100k+ files and gigabytes to compile while also constantly evolving.

What's people general sentiment on using wgpu-native vs Dawn on desktop? May Dawn be ditched?
ocornut.bsky.social
It will eventually settle, but right now whenever I spend 2 hours dealing with a PR for either Vulkan either WebGPU, it kinda feels like I've just lost a week worth of energy :(
ocornut.bsky.social
I used to dislike maintaining the Vulkan backend because most requests/PR were confusing to me.
But it turns out that WebGPU - which used to feel nice - is such a fast moving platform w/ WGPU, Dawn, Emscripten vs Native support, no binaries for Dawn, etc. that it's currently taking the crown.
ocornut.bsky.social
And then you can call DockBuilderDockWindow() in the same block so you don't necessarily need to carry the ID around.

Embarrassingly those API are not public because they suck and I never spent the time to do better but eventually I will.
ocornut.bsky.social
Replace first_time by ImGui::DockBuilderGetNode(id) == NULL before the DockSpace submission.
ocornut.bsky.social
People of the future, rejoice! There is now dear imgui renderer for this fangled new graphics API... *cough*... DirectX7!
github.com/AndenDev/D3D...
GitHub - AndenDev/D3D7Imgui
Contribute to AndenDev/D3D7Imgui development by creating an account on GitHub.
github.com
ocornut.bsky.social
and you can use dl->PathArcTo(center, radius, angle_min, angle-max); dl->PathStroke(col, 0, thickness);
ocornut.bsky.social
Note that my version uses `io.MouseDownDuration[]` array which already update, and you can make a simpler version with zero state.
Reposted by Omar
wildsheepstudio.bsky.social
Did we just upload our demo to Steam? Are we excited?

Oh yes. 🤞 🤞🤞

We are so looking forward to putting the game in the hands of players! Those are the BEST moments. Seeing people play what you made.

#gamedev #indiegame
Screengrab from steamworks that says:

"Your demo build is in the review queue. This review typically takes 3-5 days, but please allow up to 7 business days in case feedback needs to be addressed. No further action is required until the review is complete. You may still upload updated builds at any time.

You can view and respond to feedback on the Steamworks Support site"
ocornut.bsky.social
Yearly reminder that: in web browsers and many apps, you can select text inside a link by holding the Alt key.
ocornut.bsky.social
I posted the code github.com/ocornut/imgu... if it happily works for you I could consider promoting it to some opt-in helper to call.? One advantage would be to be able to standardize a way for certain widgets to disable this by setting some variable (e.g. for widgets requiring long touch)
ocornut.bsky.social
A bunch of the input owner stuff are not fully exposed in imgui.h for.. reasons.. but they stable and working.

It is the backbone for e.g. ImGui::Shortcut(ImGuiMod_Ctrl | ImGuiKey_S) working, e.g. shortcut is routed to front most focused window so if two parented windows call this only 1 gets it.
ocornut.bsky.social
Adding this before io.AddMouseButtonEvent(0, false); will also eat the left click:

#include "imgui_internal.h"

ImGui::SetKeyOwner(ImGuiKey_MouseLeft, ImGuiKeyOwner_NoOwner, ImGuiInputFlags_LockUntilRelease);
ocornut.bsky.social
Hmm brb need to cancel the left button release too..
ocornut.bsky.social
This seems to work:

if (ImGui::IsMouseDown(0) && !ImGui::IsMouseDragging(0, -1.0f) && ImGui::GetIO().MouseDownDuration[0] > 1.0f)
{
io.AddMouseButtonEvent(0, false);
io.AddMouseButtonEvent(1, true);
io.AddMouseButtonEvent(1, false);
}
ocornut.bsky.social
Just call io.AddMouseButtonEvent() twice. I wouldn’t recommend writing into those other fields directly.
ocornut.bsky.social
which version are you on? Easier to fire mouse events should be 2 lines.