@ocornut@mastodon.gamedev.place avatar

ocornut

@ocornut@mastodon.gamedev.place

game programmer.
dear imgui / wonder boy: the dragon's trap / tearaway, dreams / pixeljunk shooter, 4am / soul bubbles

This profile is from a federated server and may be incomplete. Browse more on the original instance.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

"Cog", a set of debug tools for Unreal Engine:

Lately I've been increasingly hearing anecdotes of AAA devs writing Dear ImGui tools inside Unreal for some reasons...

image/png
image/png

ocornut,
@ocornut@mastodon.gamedev.place avatar

One thing that bugs me a little is that none of those Unreal/Unity/Godot backends support multi-viewports, which would be particularly welcome.

If you are using Dear ImGui in one of those three engines please consider improving the backend to support it.

ocornut,
@ocornut@mastodon.gamedev.place avatar

@pervognsen No idea i didn’t implement the backend. Technically both could work.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Pushed current API for table angled headers to public branch:
https://github.com/ocornut/imgui/issues/6917

video/mp4

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Dear ImGui: Toyed with a proof of concept for angled tab headers, I'll see if I can nail some of the remaining design/api issues by next version..

ocornut,
@ocornut@mastodon.gamedev.place avatar

@miblo Good point, will try that too.

ocornut,
@ocornut@mastodon.gamedev.place avatar

@sol_hsa I’ll need names for the official demo!

ocornut,
@ocornut@mastodon.gamedev.place avatar

@sol_hsa Thanks!

ocornut,
@ocornut@mastodon.gamedev.place avatar
ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Is there a portable low-level trick way for callbacks in my C++ codebase to support capturing lambdas, without relying on std::function/<functional>, or with less overhead?

Merely wrapping a function pointer in std::function<> makes the call jumps through unacceptable hoops (gave up stepping after 400+ instructions, that's without capturing anything).

I don't mind capturing users paying the cost, but I don't want raw function pointers users to be paying so much. Is there a way?

ocornut,
@ocornut@mastodon.gamedev.place avatar

@pervognsen This is the context https://github.com/epezent/implot/issues/445 but I have also had requests for ImGui, e.g. consider an API like:

bool ImGui::Combo(const char* label, int* current_item+idx, const char* (getter)(void user_data, int idx), void* user_data, int items_count, ....);

ocornut,
@ocornut@mastodon.gamedev.place avatar

@pervognsen Thank you! This looks usable and easier for me to understand.

ocornut,
@ocornut@mastodon.gamedev.place avatar

@pervognsen It's telling how you are the one asking the right questions about context/constraint and coming up with something I can use (vs general bulkier solutions posted on twitter).

ocornut,
@ocornut@mastodon.gamedev.place avatar

@sol_hsa @floooh @pervognsen I don’t frequently have callbacks, but occasionally useful for high-level widgets eg Combo/ListBox expressed as a single call.
The capturing lambda thing is also mostly because many people are not familiar or confused with that void*+callback equivalent, but I think we can provide enough syntaxic sugar (following Per’s suggestion) + docs to bridge that gap without going full blown std::function.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

One of the guiding perf principle of Dear ImGui has always been that the average number of allocations per frame should be ~0.
Mostly allocate on growth frames (e.g. first time showing a new window, expanding contents), all amortized. Anything else is considered a bug.

(C++ is not a GC-ed language so it doesn't even matter as much as with a GC, but considering the software is meant to run on top of an already well stressed AAA engine, it seems like good hygiene to be always mindful of it.)

ocornut,
@ocornut@mastodon.gamedev.place avatar

I should amend this to say it's not just a question of performances: the library wants to have a little side-effect on the outer system/engine as possible. It's designed to visualize data. If user needs e.g. to debug a tricky memory issue, the tools likely to not interfere.

ocornut,
@ocornut@mastodon.gamedev.place avatar
ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Two things I've done recently as part of work on upcoming multi-select API:
(1) proof-of-concept api for Explorer-style selection from character inputs.
(2) proof-of-concept api box-selection

video/mp4
video/mp4

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

I find it a little strange to be comparing the fees of eg Unreal vs Unity for various revenues. In majority of cases the choice between either engine would probably be down to other factors.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Current status of working at home on a rainy day:

ocornut,
@ocornut@mastodon.gamedev.place avatar

@funkylab Mustard but not so sweet!

ocornut,
@ocornut@mastodon.gamedev.place avatar

@funkylab Cover with herbs, e.g. herb of provence, thym, pepper, salt, then olive oil and to oven.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

If you want to use Dear ImGui from a language other than C++: consider using "Dear Bindings" by @shironekoben . It outputs metadata to automatize binding creation while preserving nice header files. e.g. its cimgui.h output has full comments like C++ version.

https://github.com/dearimgui/dear_bindings

Ideally all manually authored bindings should switch to use "Dear Bindings", which would allow users to trivially update and regenerate their bindings.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Reminder that availability & porting of any open-source engine to consoles is only less evident because consoles manufacturers decided their API was sacred & unique & under NDA. First console manufacturer who opens up will see 100+ custom engines avail within a month.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Turns out x86’s ”mov” instruction is turing complete and movfuscator can build a version of DOOM* entirely comprised of mov instructions:
https://github.com/xoreaxeaxeax/movfuscator/blob/master/validation/doom/README.md

(*Slight performance caveat applies)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • rosin
  • InstantRegret
  • mdbf
  • osvaldo12
  • Durango
  • DreamBathrooms
  • everett
  • magazineikmin
  • thenastyranch
  • ngwrru68w68
  • Youngstown
  • slotface
  • kavyap
  • JUstTest
  • khanakhh
  • Leos
  • cisconetworking
  • tacticalgear
  • modclub
  • GTA5RPClips
  • cubers
  • ethstaker
  • anitta
  • megavids
  • normalnudes
  • tester
  • lostlight
  • All magazines