recreate presentaion queue to work in C
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
enum gnPresentationQueueState {
|
typedef enum gnPresentationQueueState_e {
|
||||||
GN_OUT_OF_DATE, GN_SUBOPTIMAL, GN_VALID
|
GN_OUT_OF_DATE, GN_SUBOPTIMAL, GN_VALID
|
||||||
};
|
} gnPresentationQueueState;
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <gryphn/gryphn_utils.h>
|
#include <gryphn/gryphn_utils.h>
|
||||||
|
|
||||||
struct gnPresentationDetails {
|
typedef struct gnPresentationDetails_t {
|
||||||
gnUInt ImageCount;
|
gnUInt ImageCount;
|
||||||
gnUInt2 ImageSize;
|
gnUInt2 ImageSize;
|
||||||
};
|
} gnPresentationDetails;
|
||||||
|
6
src/core/presentation_queue/gryphn_presentation_queue.c
Normal file
6
src/core/presentation_queue/gryphn_presentation_queue.c
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#include "gryphn_presentation_queue.h"
|
||||||
|
|
||||||
|
// gnTexture* gnGetPresentationQueueImage(gnPresentationQueue& presentationQueue, int index) {
|
||||||
|
// // if (index < gnListLength(presentationQueue.images))
|
||||||
|
// return gnListGetPtr(presentationQueue.images, index); // zero fucking error checking in this file, im not doing that shit
|
||||||
|
// }
|
@@ -1,6 +0,0 @@
|
|||||||
#include "gryphn_presentation_queue.h"
|
|
||||||
|
|
||||||
gnTexture* gnGetPresentationQueueImage(gnPresentationQueue& presentationQueue, int index) {
|
|
||||||
// if (index < gnListLength(presentationQueue.images))
|
|
||||||
return gnListGetPtr(presentationQueue.images, index); // zero fucking error checking in this file, im not doing that shit
|
|
||||||
}
|
|
@@ -2,30 +2,28 @@
|
|||||||
#include <gryphn/gryphn_utils.h>
|
#include <gryphn/gryphn_utils.h>
|
||||||
#include "gryphn_presentation_details.h"
|
#include "gryphn_presentation_details.h"
|
||||||
#include "core/output_device/gryphn_output_device.h"
|
#include "core/output_device/gryphn_output_device.h"
|
||||||
#include "core/sync_objects/gryphn_sync_semaphore.h"
|
// #include "core/sync_objects/gryphn_sync_semaphore.h"
|
||||||
#include "gryphn_present_queue_state.h"
|
#include "gryphn_present_queue_state.h"
|
||||||
#include "core/textures/gryphn_texture.h"
|
// #include "core/textures/gryphn_texture.h"
|
||||||
#include "gryphn_device_presentation_details.h"
|
// #include "gryphn_device_presentation_details.h"
|
||||||
|
|
||||||
struct gnPlatformPresentationQueue;
|
struct gnPlatformPresentationQueue_t;
|
||||||
|
|
||||||
struct gnPresentationQueue {
|
typedef struct gnPresentationQueue_t {
|
||||||
ACCESS_LEVEL:
|
struct gnPlatformPresentationQueue* presentationQueue;
|
||||||
gnPlatformPresentationQueue* presentationQueue;
|
gnBool valid;
|
||||||
bool valid = false;
|
// uint32_t textureCount;
|
||||||
gnList<gnTexture> images = gnCreateList<gnTexture>();
|
// gnTexture* texturs;
|
||||||
public:
|
} gnPresentationQueue;
|
||||||
gnPresentationQueue() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
gnTexture* gnGetPresentationQueueImage(gnPresentationQueue& presentationQueue, int index);
|
// gnTexture* gnGetPresentationQueueImage(gnPresentationQueue& presentationQueue, int index);
|
||||||
|
|
||||||
inline gnReturnCode (*gnCreatePresentationQueue)(gnPresentationQueue* presentationQueue, const gnOutputDevice& device, gnPresentationDetails& details);
|
// inline gnReturnCode (*gnCreatePresentationQueue)(gnPresentationQueue* presentationQueue, const gnOutputDevice& device, gnPresentationDetails& details);
|
||||||
inline void (*gnDestroyPresentationQueue)(gnPresentationQueue& queue);
|
// inline void (*gnDestroyPresentationQueue)(gnPresentationQueue& queue);
|
||||||
inline gnImageFormat (*_gnPresentationQueueGetImageFormat)(gnPresentationQueue& presentationQueue);
|
// inline gnImageFormat (*_gnPresentationQueueGetImageFormat)(gnPresentationQueue& presentationQueue);
|
||||||
inline gnImageFormat gnPresentationQueueGetImageFormat(gnPresentationQueue& presentationQueue) {
|
// inline gnImageFormat gnPresentationQueueGetImageFormat(gnPresentationQueue& presentationQueue) {
|
||||||
// std::cout << "gnPresentationQueueGetImageFormat should lowkey become supported\n";
|
// std::cout << "gnPresentationQueueGetImageFormat should lowkey become supported\n";
|
||||||
return _gnPresentationQueueGetImageFormat(presentationQueue);
|
// return _gnPresentationQueueGetImageFormat(presentationQueue);
|
||||||
}
|
// }
|
||||||
inline gnPresentationQueueState (*gnPresentationQueueGetState)(gnPresentationQueue& presentationQueue);
|
// inline gnPresentationQueueState (*gnPresentationQueueGetState)(gnPresentationQueue& presentationQueue);
|
||||||
inline gnReturnCode (*gnPresentationQueueGetNextImageAsync)(gnPresentationQueue& presentationQueue, const gnSyncSemaphore& semaphore, gnUInt* imageIndex);
|
// inline gnReturnCode (*gnPresentationQueueGetNextImageAsync)(gnPresentationQueue& presentationQueue, const gnSyncSemaphore& semaphore, gnUInt* imageIndex);
|
||||||
|
Reference in New Issue
Block a user