Closed jpwidera closed 3 years ago
Do you have a minimal example project that's using this?
I'm pondering if backends should provide those image handles for the wrapped version...
Do you have a minimal example project that's using this?
Sure, I uploaded to examples/sdl/Image.hs.
I'm pondering if backends should provide those image handles for the wrapped version...
Do you mean the Image handler at all, adding these AddImage functions, or that the Image is calling Raw.Image?
Oh no, I added the imgui submodule. I have to find out, how to remove it from the branch - I'll check this in the next days. I'm quite busy at the moment. Cheers
This looks worth bringing in to me. Shall we merge this, @dpwiz?
I somehow missed the recent activity. Definitely worth a merge.
Hi, I created an wrapper for the image function.
I'm not sure, if I should also provide a test-routine - I've tested it but did not clean the code for this yet. Maybe adding this to the examples would be test enough (It has it's own tutorial on the project page ?
Maybe you have an idea, how to improve the void-ptr-method in
image :: (MonadIO m) => Ptr ()-> CFloat -> CFloat -> m())
? * The Ptr() is a texture-ptr and has to be universal for (DirectX,) OpenGL, Vulkan and I have absolutely no clue, how these ptrs are represented in DirectX or Vulkan. For OpenGL it would be safe to pass an GLuint. My ideas for this:#ifdef
to enable function signatures for OpenGL/Vulkan. But I never did this before. Is it straight ahead as in C-likes?Cheers
Edit: ()The original Ptr() is described as: `typedef void ImTextureID; // User data for rendering backend to identify a texture. This is whatever to you want it to be! read the FAQ about ImTextureID for details.`