actually get uniforms to work (with my test case)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
#include "uniforms/gryphn_uniform.h"
|
||||
#include <Metal/Metal.h>
|
||||
#include <uniforms/gryphn_uniform_pool.h>
|
||||
#include "shader_module/metal_shader_module.h"
|
||||
|
||||
typedef struct metalUniformBinding {
|
||||
gnUniformType type;
|
||||
@@ -8,9 +10,15 @@ typedef struct metalUniformBinding {
|
||||
void* data;
|
||||
} metalUniformBinding;
|
||||
|
||||
typedef id<MTLResource> mtlResource;
|
||||
GN_ARRAY_LIST(mtlResource);
|
||||
|
||||
typedef struct gnPlatformUniform_t {
|
||||
uint32_t bindingCount;
|
||||
metalUniformBinding* bindings;
|
||||
uint32_t index[MAX_METAL_BINDINGS];
|
||||
id<MTLArgumentEncoder> encoder;
|
||||
id<MTLBuffer> argumentBuffer;
|
||||
|
||||
mtlResourceArrayList resources;
|
||||
} gnPlatformUniform;
|
||||
|
||||
void updateMetalBufferUniform(gnUniform uniform, gnBufferUniformInfo* info);
|
||||
|
||||
Reference in New Issue
Block a user