rename to projects (DOES NOT COMPILE)

This commit is contained in:
Gregory Wells
2025-06-24 12:04:16 -04:00
parent 7a80d0fd61
commit d66f470a52
148 changed files with 2 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
#include "gryphn_texture.h"
#include "gryphn_platform_functions.h"
gnReturnCode gnCreateTexture(gnTexture* texture, gnDevice device, const gnTextureInfo info) {
*texture = malloc(sizeof(struct gnTexture_t));
(*texture)->device = device;
(*texture)->info = info;
return device->deviceFunctions->_gnCreateTexture(*texture, device, info);
}
void gnTextureData(gnTextureHandle texture, void* pixelData) {
texture->device->deviceFunctions->_gnTextureData(texture, pixelData);
}
void gnDestroyTexture(gnTexture texture) {
texture->device->deviceFunctions->_gnDestroyTexture(texture);
}

View File

@@ -0,0 +1,38 @@
#pragma once
#include "stdint.h"
#include "utils/gryphn_image_format.h"
#include "utils/gryphn_error_code.h"
#include <gryphn_handles.h>
typedef enum gnTextureType {
GN_TEXTURE_2D
} gnTextureType;
typedef enum gnTextureFilter {
GN_FILTER_LINEAR, GN_FILTER_NEAREST
} gnTextureFilter;
typedef enum gnTextureWrap {
GN_REPEAT, GN_MIRRORED_REPEAT, GN_CLAMP_TO_EDGE, GN_CLAMP_TO_BORDER
} gnTextureWrap;
typedef struct gnTextureInfo {
uint32_t width;
uint32_t height;
gnTextureType type;
gnImageFormat format;
gnTextureFilter minFilter, magFilter;
gnTextureWrap wrapU, wrapV, wrapW;
} gnTextureInfo;
#ifdef GN_REVEAL_IMPL
struct gnTexture_t {
struct gnPlatformTexture_t* texture;
gnDeviceHandle device;
gnTextureInfo info;
};
#endif
gnReturnCode gnCreateTexture(gnTexture* texture, gnDevice device, const gnTextureInfo info);
void gnTextureData(gnTextureHandle texture, void* pixelData);
void gnDestroyTexture(gnTexture texture);