Convert Figma logo to code with AI

KhronosGroup logoVulkan-Docs

The Vulkan API Specification and related tools

2,751
462
2,751
360

Top Related Projects

4,753

Where the GPU for the Web work happens!

Quick Overview

The KhronosGroup/Vulkan-Docs repository contains the official Vulkan API documentation, including the Vulkan specification, reference pages, and related materials. It serves as the primary source for Vulkan developers to understand and implement the Vulkan graphics and compute API.

Pros

  • Comprehensive and authoritative documentation for the Vulkan API
  • Regularly updated to reflect the latest Vulkan specifications and features
  • Open-source, allowing community contributions and feedback
  • Includes tools and scripts for generating documentation in various formats

Cons

  • Can be overwhelming for beginners due to the extensive technical content
  • Requires a solid understanding of graphics programming concepts
  • Documentation updates may lag behind the latest Vulkan implementations
  • Some sections may lack detailed examples or explanations for complex topics

Getting Started

To access and use the Vulkan documentation:

  1. Clone the repository:

    git clone https://github.com/KhronosGroup/Vulkan-Docs.git
    
  2. Navigate to the xml directory to find the core Vulkan API specification in XML format.

  3. Use the scripts directory to generate documentation in various formats (e.g., HTML, PDF).

  4. Refer to the CONTRIBUTING.md file for guidelines on contributing to the documentation.

  5. Check the README.md file for additional information on building and using the documentation.

Note: This repository primarily contains documentation and specification files, not code examples or libraries for direct implementation.

Competitor Comparisons

4,753

Where the GPU for the Web work happens!

Pros of gpuweb

  • Designed for modern web technologies, making it more accessible for web developers
  • Simpler API with a higher level of abstraction, reducing boilerplate code
  • Cross-platform compatibility, including web browsers and native platforms

Cons of gpuweb

  • Less fine-grained control over hardware compared to Vulkan
  • Potentially lower performance in certain scenarios due to higher-level abstraction
  • Smaller ecosystem and fewer resources available compared to Vulkan's mature community

Code Comparison

Vulkan-Docs (C++):

VkCommandBufferBeginInfo beginInfo = {};
beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
vkBeginCommandBuffer(commandBuffer, &beginInfo);

gpuweb (JavaScript):

const commandEncoder = device.createCommandEncoder();
const passEncoder = commandEncoder.beginRenderPass(renderPassDescriptor);

The gpuweb example demonstrates a more straightforward API with less setup required, while the Vulkan-Docs example shows more explicit control over low-level details. gpuweb's approach is generally easier for web developers to understand and use, but may sacrifice some performance and flexibility compared to Vulkan's more verbose but powerful API.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

// Copyright 2017-2024 The Khronos Group Inc. // SPDX-License-Identifier: CC-BY-4.0

ifdef::env-github[] :note-caption: :information_source: endif::[]

= Vulkan^(R)^ and Vulkan^(R)^ SC API Documentation Project

For Vulkan^(R)^ API specific documentation see link:READMEVK.adoc[READMEVK.adoc]

For Vulkan^(R)^ SC API specific documentation see link:READMESC.adoc[READMESC.adoc]

== Directory Structure

The directory structure is as follows:

README.adoc           This file
READMESC.adoc         Readme for the Vulkan SC specification
READMEVK.adoc         Readme for the Vulkan specification
BUILD.adoc            Documents how to build the specifications and reference pages
CONTRIBUTING.adoc     Requirements for external contributions to the repository
COPYING.adoc          Copyright and licensing information
CODE_OF_CONDUCT.adoc  Code of Conduct
LICENSE.adoc          Summary of licenses used by files in the repository
ChangeLog.adoc        Change log summary for each public Vulkan spec update
ChangeLogSC.adoc      Change log summary for each public Vulkan SC spec update
Makefile, make*       Makefile and helper build scripts (see BUILD.adoc)
antora/               Staging area for the docs.vulkan.org Antora 'proposals' and 'spec' modules
appendices/           Specification appendices
chapters/             Specification chapters
proposals/            Design documents for extensions
config/               Asciidoctor configuration, CSS, and index generator
images/               Images (figures, diagrams, icons)
gen/out/              Default directory for the generated documents
scripts/              Helper scripts used in specification, header, and reference page generation
style/                Sources for "styleguide" (Vulkan Documentation and Extensions: Procedures and Conventions)
xml/                  XML API Registry (`vk.xml`) as well as XML for non-Vulkan
                      data structures used with Video extensions (`video.xml`)
registry.adoc         Source for documentation of the XML format

== Building the Specification and Reference Pages

The document sources are marked up in Asciidoctor format, and we use asciidoctor and related toolchain components to generate output documents. See link:BUILD.adoc[BUILD.adoc] for more information on installing the toolchain and building the Specification.

== Generating Headers and Related Files

See link:xml/README.adoc[xml/README.adoc].

The header files (include/vulkan/vulkan*.h) and many parts of the specification and reference page documents are generated from descriptions in the XML API Registry (link:xml/vk.xml[xml/vk.xml]). The generated files are not checked into the repository. If you change vk.xml, you can regenerate the headers by going into xml/ and running:

$ make clean install

The other generated files are built as required via dependencies in the top-level Makefile.