rename to projects (DOES NOT COMPILE)
This commit is contained in:
13
projects/core/src/shader_module/gryphn_shader_module.c
Normal file
13
projects/core/src/shader_module/gryphn_shader_module.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <gryphn_platform_functions.h>
|
||||
#include "gryphn_shader_module.h"
|
||||
|
||||
gnReturnCode gnCreateShaderModule(gnShaderModuleHandle* module, gnOutputDeviceHandle device, struct gnShaderModuleInfo_t shaderModuleInfo) {
|
||||
*module = malloc(sizeof(struct gnShaderModule_t));
|
||||
(*module)->device = device;
|
||||
(*module)->info = shaderModuleInfo;
|
||||
return device->deviceFunctions->_gnCreateShaderModule(*module, device, shaderModuleInfo);
|
||||
}
|
||||
|
||||
void gnDestroyShaderModule(gnShaderModuleHandle module) {
|
||||
module->device->deviceFunctions->_gnDestroyShaderModule(module);
|
||||
}
|
||||
29
projects/core/src/shader_module/gryphn_shader_module.h
Normal file
29
projects/core/src/shader_module/gryphn_shader_module.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include "stdint.h"
|
||||
#include "utils/gryphn_string.h"
|
||||
#include "utils/gryphn_error_code.h"
|
||||
#include "gryphn_handles.h"
|
||||
|
||||
typedef enum gnShaderModuleStage_e {
|
||||
GN_VERTEX_SHADER_MODULE = 0x00000001,
|
||||
GN_FRAGMENT_SHADER_MODULE = 0x00000002,
|
||||
GN_ALL_SHADER_MODULE = 0xffffffff
|
||||
} gnShaderModuleStage;
|
||||
|
||||
typedef struct gnShaderModuleInfo_t {
|
||||
gnShaderModuleStage stage;
|
||||
uint32_t* code;
|
||||
uint32_t size;
|
||||
gnString entryPoint;
|
||||
} gnShaderModuleInfo;
|
||||
|
||||
#ifdef GN_REVEAL_IMPL
|
||||
struct gnShaderModule_t {
|
||||
struct gnPlatformShaderModule_t* shaderModule;
|
||||
gnShaderModuleInfo info;
|
||||
gnOutputDeviceHandle device;
|
||||
};
|
||||
#endif
|
||||
|
||||
gnReturnCode gnCreateShaderModule(gnShaderModuleHandle* module, gnOutputDeviceHandle device, struct gnShaderModuleInfo_t shaderModuleInfo);
|
||||
void gnDestroyShaderModule(gnShaderModuleHandle module);
|
||||
Reference in New Issue
Block a user