github.com/Seikaijyu/gio@v0.0.1/gpu/api.go (about)

     1  // SPDX-License-Identifier: Unlicense OR MIT
     2  
     3  package gpu
     4  
     5  import "github.com/Seikaijyu/gio/gpu/internal/driver"
     6  
     7  // An API carries the necessary GPU API specific resources to create a Device.
     8  // There is an API type for each supported GPU API such as OpenGL and Direct3D.
     9  type API = driver.API
    10  
    11  // A RenderTarget denotes the destination framebuffer for a frame.
    12  type RenderTarget = driver.RenderTarget
    13  
    14  // OpenGLRenderTarget is a render target suitable for the OpenGL backend.
    15  type OpenGLRenderTarget = driver.OpenGLRenderTarget
    16  
    17  // Direct3D11RenderTarget is a render target suitable for the Direct3D 11 backend.
    18  type Direct3D11RenderTarget = driver.Direct3D11RenderTarget
    19  
    20  // MetalRenderTarget is a render target suitable for the Metal backend.
    21  type MetalRenderTarget = driver.MetalRenderTarget
    22  
    23  // VulkanRenderTarget is a render target suitable for the Vulkan backend.
    24  type VulkanRenderTarget = driver.VulkanRenderTarget
    25  
    26  // OpenGL denotes the OpenGL or OpenGL ES API.
    27  type OpenGL = driver.OpenGL
    28  
    29  // Direct3D11 denotes the Direct3D API.
    30  type Direct3D11 = driver.Direct3D11
    31  
    32  // Metal denotes the Apple Metal API.
    33  type Metal = driver.Metal
    34  
    35  // Vulkan denotes the Vulkan API.
    36  type Vulkan = driver.Vulkan
    37  
    38  // ErrDeviceLost is returned from GPU operations when the underlying GPU device
    39  // is lost and should be recreated.
    40  var ErrDeviceLost = driver.ErrDeviceLost