17 lines
611 B
C
17 lines
611 B
C
#include "gryphn_texture.h"
|
|
#include "core/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);
|
|
}
|