Skip to content

KDGpu::Instance

Module: Public API

Instance is used to initialize the Rendering API. More...

#include <KDGpu/instance.h>

Public Functions

Name
Instance()
~Instance()
Instance(Instance && other)
Instance & operator=(Instance && other)
Instance(const Instance & ) =delete
Instance & operator=(const Instance & ) =delete
Handle< Instance_t > handle() const
bool isValid() const
operator Handle< Instance_t >() const
std::vector< Extension > extensions() const
Returns the extensions requested for the instance.
AdapterAndDevice createDefaultDevice(const Surface & surface, AdapterDeviceType deviceType =AdapterDeviceType::Default) const
Convenience function used to create a Device instance that supports presentation against Surfacesurface.
std::vector< Adapter * > adapters() const
Returns a vector of the Adapter instances available for the instance.
std::vector< AdapterGroup > adapterGroups() const
Returns a vector of the AdapterGroups available for the instance. AdapterGroup allow to spread operations across multiple adapters;.
Adapter * selectAdapter(AdapterDeviceType deviceType) const
Convenience function to easily select an Adapter instance.
Surface createSurface(const SurfaceOptions & options)
Create a Surface instance based on the provided options.

Friends

Name
class GraphicsApi
class VulkanGraphicsApi

Detailed Description

1
class KDGpu::Instance;

Instance is used to initialize the Rendering API.

See:

1
2
3
4
5
6
7
8
using namespace KDGpu;

std::unique_ptr<GraphicsApi> api = std::make_unique<VulkanGraphicsApi>();

Instance instance = api->createInstance(InstanceOptions{
        .applicationName = "MyApplication",
        .applicationVersion = 0,
});

Public Functions Documentation

function Instance

1
Instance()

function ~Instance

1
~Instance()

function Instance

1
2
3
Instance(
    Instance && other
)

function operator=

1
2
3
Instance & operator=(
    Instance && other
)

function Instance

1
2
3
Instance(
    const Instance & 
) =delete

function operator=

1
2
3
Instance & operator=(
    const Instance & 
) =delete

function handle

1
inline Handle< Instance_t > handle() const

function isValid

1
inline bool isValid() const

function operator Handle< Instance_t >

1
inline operator Handle< Instance_t >() const

function extensions

1
std::vector< Extension > extensions() const

Returns the extensions requested for the instance.

function createDefaultDevice

1
2
3
4
AdapterAndDevice createDefaultDevice(
    const Surface & surface,
    AdapterDeviceType deviceType =AdapterDeviceType::Default
) const

Convenience function used to create a Device instance that supports presentation against Surfacesurface.

function adapters

1
std::vector< Adapter * > adapters() const

Returns a vector of the Adapter instances available for the instance.

function adapterGroups

1
std::vector< AdapterGroup > adapterGroups() const

Returns a vector of the AdapterGroups available for the instance. AdapterGroup allow to spread operations across multiple adapters;.

function selectAdapter

1
2
3
Adapter * selectAdapter(
    AdapterDeviceType deviceType
) const

Convenience function to easily select an Adapter instance.

function createSurface

1
2
3
Surface createSurface(
    const SurfaceOptions & options
)

Create a Surface instance based on the provided options.

Friends

friend GraphicsApi

1
2
3
friend class GraphicsApi(
    GraphicsApi 
);

friend VulkanGraphicsApi

1
2
3
friend class VulkanGraphicsApi(
    VulkanGraphicsApi 
);

Updated on 2024-09-08 at 00:13:10 +0000