Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vulkan rendering backend example #531

Closed
dkrikun opened this issue Feb 21, 2016 · 10 comments
Closed

Add Vulkan rendering backend example #531

dkrikun opened this issue Feb 21, 2016 · 10 comments
Labels

Comments

@dkrikun
Copy link

dkrikun commented Feb 21, 2016

No description provided.

@ocornut
Copy link
Owner

ocornut commented Feb 21, 2016

There's not much point in providing millions of examples. While I probably won't mind one I don't feel this should be in an explicit Issue list. If you have a serious PR why not.

Note:

  • we don't even have a raw OpenGL backend example (and it wouldn't be portable)
  • GLFW seems to support Vulcan

@ratchetfreak
Copy link

But using vulkan vs. opengl in glfw is totally different.

@MrSapps
Copy link

MrSapps commented Feb 21, 2016

Hes saying that glfw will do the input/window creation, but can use vulkan instead of ogl: http://www.glfw.org/docs/3.2/vulkan.html so it isn't totally different at all.

@ocornut
Copy link
Owner

ocornut commented Feb 21, 2016

Thats a good point - so we could add a glfw+vulkan example if someone wants to make it. I would imagine that anyone who wants to spend time with vulkan wont have difficulties creating the 30ish lines render function.

Concerns:

  • i dont know vulkan and dont know if there are obvious best practices or way to make such exemple as simple as possible. Given that PR for exemples app are rarely satisfactory or made with extreme care, this is likely going to require janitoring on my side (is this the best/simplest way to do the rendering, it is following the structures of other examples, etc)
  • The current .sln setup imply that the user can build all the demos under msvc which wouldn't be the case with Vulkan. To be included there we would need to reimagine the sln/vcproj setup. We perhaps should have a vcproj + separate sln for al separate demos + a sln grouping all projects. As an alternative, a batch file for msvc could be provided and we can solve the vcproj/sln situation later.

On 21 Feb 2016, at 12:13, ratchetfreak notifications@github.com wrote:

But using vulkan vs. opengl in glfw is totally different.


Reply to this email directly or view it on GitHub.

@tambry
Copy link

tambry commented Feb 28, 2016

@ocornut I have made a ImGui Vulkan renderer, which is available here.
What would you think about adding that as an example? (clone it as a submodule and then make a small example showcasing the use)
A full self-contained Vulkan example would be likely at least 1000 lines, but probably somewhere around ~1200.

@ocornut
Copy link
Owner

ocornut commented Feb 28, 2016

Hello Raul, thanks for posting that. I would like to add a Vulkan example but it would need to more closely follow the structure of other examples. Your code could be used as a base reference to build such example but it would need some work in refactoring it. I probably won't have time to do it myself but would take such PR.

@ratchetfreak
Copy link

And frankly I'd prefer if the example supported multiple frames in flight. Your code uses the render-and-wait approach and creates and allocates all the resources needed for the frame when rendering and after the wait they get destroyed again. Delaying the cleanup of resources (or better yet put them in a pool for reuse) is more complicated but would utilize the cpu and gpu much more effectively

There is a similar issue with the D3D12 example pull request.

@ocornut
Copy link
Owner

ocornut commented Feb 28, 2016

Happy to have whatever makes more sense in Vulkan (up for debate here, I don't know anything about Vulkan) but it still would be preferable to design the example as close as possible to the others in term of end-user API whenever possible, folder structure, shader embedded in source code for maximum portability.,etc.

@ocornut
Copy link
Owner

ocornut commented Mar 9, 2016

Also see #549 "Vulkan Example"

@ocornut ocornut mentioned this issue Mar 9, 2016
@ocornut
Copy link
Owner

ocornut commented Apr 3, 2016

Done, merged Vulkan example from #549 today.
@tambry I haven't picked your code because it was too different from other ImGui examples applications. However seeing you have some Vulkan experience (which I don't), it would be nice if you could look at the existing example and see if you have any comment about it :) Thanks!

@ocornut ocornut closed this as completed Apr 3, 2016
@ocornut ocornut added the vulkan label Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants