Closed BarisUckardes closed 3 years ago
That's a ton of code there, so I won't be able to read through all of it to find the exact issue. However, I do notice that you have declared the third vertex element incorrectly. imgui uses a single packed 32-bit RGBA color format for the third vertex element, not a 4-float format. This alone is likely screwing up all of your vertex data when you go to render it. Apart from that, there is a similar issue in your texture creation -- you are using the wrong texture format. These details are a little tricky to get right.
If you would like to build a D3D11-based renderer yourself, I'd suggest basing it off the official D3D11 renderer in the imgui repo. For instance, here is the part where vertex inputs are described. Given how close SharpDX is to native D3D11, it should be fairly simple to copy the C++ implementation and slowly adapt it into normal C#.
Oh boy,i forgot this post even existing.
I moved on from SharpDX
,currently using OpenTK
due to SharpDX
is abandoned.
Thanks for input but i no longer require it, however you recently helped me with this https://github.com/mellinoe/ImGui.NET/issues/239 .You can see i try to find my way through OpenTK
and ImGui.Net
So this issue is satisfied
I have been trying to implement a imgui solution for my SharpDX project and bumped along the way.
I checked the samples and made attempt according to those sample(s).
I get no errors if i invoke
ImGui.ShowDemoWindow()
but get nothing on my screen while i got an error if i try to display a text "Attempted to read or write protected memory"Here is my code path
I start with initializing my ImGui renderer object like this
this is my
Initialize()
methodFirst my
CreateRendererResources()
methodThus i create font texture using
RecreateFontDeviceTexture()
methodHow i create my FontTexture
In case of you are wondering key mapping
Finally my render method
RenderUIData
Here's some findings
ImDrawCmdPtr
.it outputs varies from 300 to 3400 triangle per frame so there are triangles submited