ahmed605 / imgui-uwp

UWP backend for Dear ImGui
13 stars 0 forks source link

I get tons of errors, i need a little bit of help, all errors are in the backends cpp file #2

Closed qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz closed 6 months ago

qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

image this is the error i get, can you please help me <3

ahmed605 commented 6 months ago

which ImGui version are you using? ImGui-UWP was only tested on v1.90+ also what are the C++ & Windows SDK versions used? ImGui-UWP was only tested on C++ 17 with Windows 11 22000+ SDK

also make sure you included ImGui headers in this order: imgui.h, imgui_impl_uwp.h, and the graphics backend header of choice, so like this for example:

#include <imgui.h>
#include <imgui_impl_uwp.h>
#include <imgui_impl_dx12.h>
qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

ok, i got everything narrowed down to just these issues.

image

i tried using GPT but it was no help

qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

im using imgui 1.95, C++ 20, release x64

qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

ive also tried to set them to values but nothing worked

ahmed605 commented 6 months ago

ok, i got everything narrowed down to just these issues.

image

i tried using GPT but it was no help

Seems like you aren't using a standard UWP project, can you check if linking WindowsApp.lib fixes it?

qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

ok, i got everything narrowed down to just these issues. image i tried using GPT but it was no help

Seems like you aren't using a standard UWP project, can you check if linking WindowsApp.lib fixes it?

i will try right now

qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

IT FIXED IT!!! THANK YOU SO MUCH

Also, how can i hook keyboard inputs? i managed to do mouse inputs but not keyboard

ahmed605 commented 6 months ago

the backend should already support keyboard input, I have tried it with built-in ImGui text input controls and it was working

qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

image i cant type still, is there something i need to add into my main code for it to work? currently i have only included the backends

ahmed605 commented 6 months ago

Can you show me how do you initialize the backend?

qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

thats what im having trouble with, im very new to imgui

qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

this is my main thread

image

this is my current render init

image

ahmed605 commented 6 months ago

oh this is how the backend should be initialized https://github.com/ahmed605/imgui-uwp/blob/6e131e8de2d13f1824b2e0f32d3382f4c69ec4cd/examples/example_uwp_directx12/main.cpp#L76-L103

qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

ill give it a shot, thanks!

qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

do you have discord by any chance?

ahmed605 commented 6 months ago

yes, @ahmedwalid

qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

sent im havic

qwepotiuwyasjlkdsajdghmnbxzcvgergergsdz commented 6 months ago

image