opengl uniform pools
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
#include "presentation_queue/opengl_presentation_queue.h"
|
#include "presentation_queue/opengl_presentation_queue.h"
|
||||||
#include "shaders/opengl_shader_module.h"
|
#include "shaders/opengl_shader_module.h"
|
||||||
#include "renderpass/opengl_render_pass_descriptor.h"
|
#include "renderpass/opengl_render_pass_descriptor.h"
|
||||||
|
#include "uniforms/pool/opengl_uniform_pool.h"
|
||||||
|
|
||||||
gnDeviceFunctions loadOpenGLDeviceFunctions() {
|
gnDeviceFunctions loadOpenGLDeviceFunctions() {
|
||||||
return (gnDeviceFunctions){
|
return (gnDeviceFunctions){
|
||||||
@@ -31,9 +32,9 @@ gnDeviceFunctions loadOpenGLDeviceFunctions() {
|
|||||||
._gnMapBuffer = NULL,
|
._gnMapBuffer = NULL,
|
||||||
._gnDestroyBuffer = NULL,
|
._gnDestroyBuffer = NULL,
|
||||||
|
|
||||||
._gnCreateUniformPool = NULL,
|
._gnCreateUniformPool = openglCreateUniformPool,
|
||||||
._gnUniformPoolAllocateUniforms = NULL,
|
._gnUniformPoolAllocateUniforms = openglAllocateUniforms,
|
||||||
._gnDestroyUniformPool = NULL,
|
._gnDestroyUniformPool = openglDestroyUniformPool,
|
||||||
|
|
||||||
._gnUpdateBufferUniform = NULL,
|
._gnUpdateBufferUniform = NULL,
|
||||||
._gnUpdateStorageUniform = NULL,
|
._gnUpdateStorageUniform = NULL,
|
||||||
|
14
projects/apis/opengl/src/uniforms/pool/opengl_uniform_pool.c
Normal file
14
projects/apis/opengl/src/uniforms/pool/opengl_uniform_pool.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include "opengl_uniform_pool.h"
|
||||||
|
|
||||||
|
gnReturnCode openglCreateUniformPool(gnUniformPool pool, gnDeviceHandle device) {
|
||||||
|
return GN_SUCCESS;
|
||||||
|
}
|
||||||
|
gnUniform* openglAllocateUniforms(gnUniformPool pool, const gnUniformAllocationInfo allocInfo) {
|
||||||
|
gnUniform* uniforms = malloc(sizeof(gnUniform) * allocInfo.setCount);
|
||||||
|
for (int i = 0; i < allocInfo.setCount; i++)
|
||||||
|
uniforms[i] = malloc(sizeof(struct gnUniform_t));
|
||||||
|
return uniforms;
|
||||||
|
}
|
||||||
|
void openglDestroyUniformPool(gnUniformPool pool) {
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "core/src/uniforms/gryphn_uniform_pool.h"
|
||||||
|
|
||||||
|
typedef struct gnPlatformUniformPool_t { gnBool warningAvoider; } gnPlatformUniformPool;
|
||||||
|
gnReturnCode openglCreateUniformPool(gnUniformPool pool, gnDeviceHandle device);
|
||||||
|
gnUniform* openglAllocateUniforms(gnUniformPool pool, const gnUniformAllocationInfo allocInfo);
|
||||||
|
void openglDestroyUniformPool(gnUniformPool pool);
|
Reference in New Issue
Block a user