rename gnPhysicalOutputDevice -> gnPhysicalDevice
This commit is contained in:
@@ -20,14 +20,12 @@ typedef struct handle##_t* alias##Handle; \
|
||||
typedef struct handle##_t* alias
|
||||
|
||||
GN_HANDLE(gnInstance);
|
||||
|
||||
GN_HANDLE(gnPhysicalDevice); // NOTE: needs to become a impl handle
|
||||
|
||||
GN_HANDLE(gnWindowSurface);
|
||||
GN_HANDLE(gnPresentationQueue);
|
||||
GN_HANDLE(gnTexture);
|
||||
GN_HANDLE(gnRenderPassDescriptor);
|
||||
GN_HANDLE(gnPhysicalOutputDevice);
|
||||
GN_HANDLE_ALIAS(gnPhysicalOutputDevice, gnPhysicalDevice);
|
||||
GN_HANDLE(gnOutputDevice);
|
||||
GN_HANDLE_ALIAS(gnOutputDevice, gnDevice);
|
||||
GN_HANDLE(gnShaderModule);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <output_device/gryphn_physical_output_device.h>
|
||||
#include <output_device/gryphn_physical_device.h>
|
||||
#include <core/gryphn_return_code.h>
|
||||
|
||||
typedef struct gnOutputDeviceEnabledFeatures {
|
||||
|
17
projects/core/src/output_device/gryphn_physical_device.c
Normal file
17
projects/core/src/output_device/gryphn_physical_device.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "gryphn_physical_device.h"
|
||||
#include "instance/gryphn_instance.h"
|
||||
#include "loader/src/gryphn_instance_functions.h"
|
||||
|
||||
gnPhysicalDeviceHandle* gnGetPhyscialDevices(gnInstanceHandle instance, uint32_t* count) {;
|
||||
gnPhysicalDeviceHandle* devices = instance->callingLayer->instanceFunctions._gnGetPhysicalDevices(instance, count);
|
||||
for (uint32_t i = 0; i < *count; i++)
|
||||
devices[i]->instance = instance;
|
||||
return devices;
|
||||
}
|
||||
|
||||
gnBool gnPhysicalDeviceCanPresentToSurface(gnPhysicalDeviceHandle device, gnWindowSurfaceHandle windowSurface) {
|
||||
return device->instance->callingLayer->instanceFunctions._gnPhysicalDeviceCanPresentToSurface(device, windowSurface);
|
||||
}
|
||||
|
||||
gnPhysicalDeviceProperties gnGetPhysicalDeviceProperties(gnPhysicalDeviceHandle device) { return device->properties; }
|
||||
gnPhysicalDeviceFeatures gnGetPhysicalDeviceFeatures(gnPhysicalDeviceHandle device) { return device->features; }
|
@@ -29,7 +29,7 @@ typedef struct gnPhysicalDeviceFeatures {
|
||||
} gnPhysicalDeviceFeatures;
|
||||
|
||||
#ifdef GN_REVEAL_IMPL
|
||||
typedef struct gnPhysicalOutputDevice_t {
|
||||
typedef struct gnPhysicalDevice_t {
|
||||
struct gnPlatformPhysicalDevice_t* physicalDevice;
|
||||
gnPhysicalDeviceProperties properties;
|
||||
gnPhysicalDeviceFeatures features;
|
||||
@@ -38,8 +38,8 @@ typedef struct gnPhysicalOutputDevice_t {
|
||||
} gnPhysicalOutputDevice_t;
|
||||
#endif
|
||||
|
||||
gnPhysicalOutputDeviceHandle* gnGetPhyscialDevices(gnInstanceHandle instance, uint32_t* count);
|
||||
gnBool gnPhysicalDeviceCanPresentToSurface(gnPhysicalOutputDeviceHandle device, gnWindowSurfaceHandle windowSurface);
|
||||
gnPhysicalDeviceHandle* gnGetPhyscialDevices(gnInstanceHandle instance, uint32_t* count);
|
||||
gnBool gnPhysicalDeviceCanPresentToSurface(gnPhysicalDeviceHandle device, gnWindowSurfaceHandle windowSurface);
|
||||
|
||||
gnPhysicalDeviceProperties gnGetPhysicalDeviceProperties(gnPhysicalOutputDeviceHandle device);
|
||||
gnPhysicalDeviceFeatures gnGetPhysicalDeviceFeatures(gnPhysicalOutputDeviceHandle device);
|
||||
gnPhysicalDeviceProperties gnGetPhysicalDeviceProperties(gnPhysicalDeviceHandle device);
|
||||
gnPhysicalDeviceFeatures gnGetPhysicalDeviceFeatures(gnPhysicalDeviceHandle device);
|
@@ -1,17 +0,0 @@
|
||||
#include "gryphn_physical_output_device.h"
|
||||
#include "instance/gryphn_instance.h"
|
||||
#include "loader/src/gryphn_instance_functions.h"
|
||||
|
||||
gnPhysicalOutputDeviceHandle* gnGetPhyscialDevices(gnInstanceHandle instance, uint32_t* count) {;
|
||||
gnPhysicalOutputDeviceHandle* devices = instance->callingLayer->instanceFunctions._gnGetPhysicalDevices(instance, count);
|
||||
for (uint32_t i = 0; i < *count; i++)
|
||||
devices[i]->instance = instance;
|
||||
return devices;
|
||||
}
|
||||
|
||||
gnBool gnPhysicalDeviceCanPresentToSurface(gnPhysicalOutputDeviceHandle device, gnWindowSurfaceHandle windowSurface) {
|
||||
return device->instance->callingLayer->instanceFunctions._gnPhysicalDeviceCanPresentToSurface(device, windowSurface);
|
||||
}
|
||||
|
||||
gnPhysicalDeviceProperties gnGetPhysicalDeviceProperties(gnPhysicalOutputDeviceHandle device) { return device->properties; }
|
||||
gnPhysicalDeviceFeatures gnGetPhysicalDeviceFeatures(gnPhysicalOutputDeviceHandle device) { return device->features; }
|
@@ -2,7 +2,7 @@
|
||||
#include "stdint.h"
|
||||
#include "core/gryphn_image_format.h"
|
||||
#include "core/gryphn_return_code.h"
|
||||
#include "core/src/output_device/gryphn_physical_output_device.h"
|
||||
#include "core/src/output_device/gryphn_physical_device.h"
|
||||
#include "gryphn_handles.h"
|
||||
|
||||
typedef enum gnRenderPassStage {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "core/gryphn_image_format.h"
|
||||
#include "core/gryphn_return_code.h"
|
||||
#include "utils/math/gryphn_vec3.h"
|
||||
#include "core/src/output_device/gryphn_physical_output_device.h"
|
||||
#include "core/src/output_device/gryphn_physical_device.h"
|
||||
#include <gryphn_handles.h>
|
||||
|
||||
typedef enum gnTextureType {
|
||||
|
Reference in New Issue
Block a user