Home

Awesome

Vulkan & OpenGL & Command-list Sample using "Thread-Workers"

With the official release of Vulkan, NVIDIA and the "Devtech-Proviz" Team released new samples on professional graphics repository.

The Purpose of this Blog post is to give more details on what is happening in the Sample called gl_vk_bk3dthreaded (available here).

Example

How to build the sample

For now, I am sorry to say that the sample might only run on Windows. I didn't consolidate it for Linux, yet.

This sample requires the following:

Optionally, be aware that other bk3d models could be used in this sample. But to avoid heavy download, only the submarine will be taken by default. Check MODEL_DOWNLOAD_MORE On for more models...

How does the sample work

The sample will run by default with the submarine model and some camera animation. So if you want to freely move the camera, don't forget to stop the animation (UI or 'a' key)

If you give as cmd-line argument another model (*.bk3d.gz or *.bk3d), the sample should be able to render it but the animation will be turned off; and it is possible that the camera won't focus exactly over the new model...

Vulkan renderer will be the default one at startup. You can switch between:

toggles

Note: toggles are preceded by a character between quotes: when the viewport has the focus, you can use the keyboard instead.

###cmd-line arguments

mouse

special Key with the mouse allows few to move around the model. The camera is always targeting a focus point and is essentially working in "polar coordinates" (TODO: I need to display the focus point with a cross...)

3D model(s)

the 3D model comes from a pre-baked format (see here ). There is no value to understand how it is working: main interest is that it loads fast (baked format... saving us parsing time) and that I managed to 'capture' some models as they were issued by various applications.

The sample will load the model, then attach it to the renderers. The resource creation will thus depend on which Graphic API is being used.

More technical details

Here are more details in separate sub-sections :