horrible uniform pool API
This commit is contained in:
@@ -25,3 +25,4 @@ GN_HANDLE(gnFence);
|
||||
GN_HANDLE(gnFramebuffer);
|
||||
GN_HANDLE(gnBuffer);
|
||||
GN_HANDLE(gnUniformPool);
|
||||
GN_HANDLE(gnUniform);
|
||||
|
@@ -88,6 +88,7 @@ typedef struct gnDeviceFunctions_t {
|
||||
void (*_gnDestroyBuffer)(gnBufferHandle buffer);
|
||||
|
||||
gnReturnCode (*_gnCreateUniformPool)(gnUniformPool pool, gnDeviceHandle device);
|
||||
gnUniform* (*_gnUniformPoolAllocateUniforms)(gnUniformPool pool, const gnUniformLayout layout);
|
||||
|
||||
gnReturnCode (*_gnCreateFence)(gnFenceHandle fence, gnOutputDeviceHandle device);
|
||||
void (*_gnSignalFence)(gnFenceHandle fence);
|
||||
|
@@ -90,6 +90,7 @@ void gnLoadDeviceFunctions(struct gnDynamicLibrary_t* lib, struct gnDeviceFuncti
|
||||
gnLoadDLLFunction(lib, functions->_gnMapBuffer, "gnMapBufferFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnDestroyBuffer, "gnDestroyBufferFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnCreateUniformPool, "gnCreateUniformPoolFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnUniformPoolAllocateUniforms, "gnUniformPoolAllocateUniformsFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnCreateFence, "gnCreateFenceFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnSignalFence, "gnSignalFenceFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnWaitForFence, "gnWaitForFenceFn");
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// #pragma once
|
||||
#pragma once
|
||||
|
||||
// #ifdef GN_REVEAL_IMPL
|
||||
// struct gnUniform_t {
|
||||
|
||||
// };
|
||||
// #endif
|
||||
#ifdef GN_REVEAL_IMPL
|
||||
struct gnUniform_t {
|
||||
struct gnPlatformUniform_t* uniform;
|
||||
};
|
||||
#endif
|
||||
|
@@ -3,7 +3,8 @@
|
||||
#include "core/shader_module/gryphn_shader_module.h"
|
||||
|
||||
typedef enum gnUniformType {
|
||||
GN_UNIFORM_BUFFER_DESCRIPTOR
|
||||
GN_UNIFORM_BUFFER_DESCRIPTOR,
|
||||
GN_UNIFORM_TYPE_MAX
|
||||
} gnUniformType;
|
||||
|
||||
typedef struct gnUniformBinding {
|
||||
|
@@ -8,3 +8,7 @@ gnReturnCode gnCreateUniformPool(gnUniformPool* pool, gnDeviceHandle device) {
|
||||
(*pool)->device = device;
|
||||
return device->deviceFunctions->_gnCreateUniformPool(*pool, device);
|
||||
}
|
||||
|
||||
gnUniform* gnUniformPoolAllocateUniforms(gnUniformPool pool, const gnUniformLayout layout) {
|
||||
return pool->device->deviceFunctions->_gnUniformPoolAllocateUniforms(pool, layout);
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "core/gryphn_handles.h"
|
||||
#include "utils/gryphn_error_code.h"
|
||||
#include "core/uniforms/gryphn_uniform_layout.h"
|
||||
|
||||
#ifdef GN_REVEAL_IMPL
|
||||
struct gnUniformPool_t {
|
||||
@@ -10,4 +11,4 @@ struct gnUniformPool_t {
|
||||
#endif
|
||||
|
||||
gnReturnCode gnCreateUniformPool(gnUniformPool* pool, gnDeviceHandle device);
|
||||
// void gnUniformPoolAllocateUniforms
|
||||
gnUniform* gnUniformPoolAllocateUniforms(gnUniformPool pool, const gnUniformLayout layout);
|
||||
|
Reference in New Issue
Block a user