Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Vulkan

You're reading from  Learning Vulkan

Product type Book
Published in Dec 2016
Publisher Packt
ISBN-13 9781786469809
Pages 466 pages
Edition 1st Edition
Languages
Author (1):
Parminder Singh Parminder Singh
Profile icon Parminder Singh

Table of Contents (18) Chapters

Learning Vulkan
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
1. Getting Started with the NextGen 3D Graphics API 2. Your First Vulkan Pseudo Program 3. Shaking Hands with the Device 4. Debugging in Vulkan 5. Command Buffer and Memory Management in Vulkan 6. Allocating Image Resources and Building a Swapchain with WSI 7. Buffer Resource, Render Pass, Framebuffer, and Shaders with SPIR-V 8. Pipelines and Pipeline State Management 9. Drawing Objects 10. Descriptors and Push Constant 11. Drawing Textures

Recording command buffers


A command buffer is recorded using the vkBeginCommandBuffer() and vkEndCommandBuffer() APIs. These APIs define the scope under which any specified Vulkan commands are recorded. The following example shows the recording of the Render Pass instance creation between these two APIs, which works as the start and end scopes. For more information on creating a Render Pass, refer to the Understanding the Render Pass section in Chapter 7, Buffer Resource, Render Pass, Framebuffer, and Shaders with SPIR-V.

The start of the recording is performed using the vkBeginCommandBuffer() API. This defines the starting scope after which any call specified is considered to be recorded until the end scope is reached (vkEndCommandBuffer()).

The following is the syntax of this API, followed by a description of the necessary parameters:

VkResult vkBeginCommandBuffer( 
    VkCommandBuffer                 commandBuffer, 
    const VkCommandBufferBeginInfo* pBeginInfo); 

This...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}