gryphn texture API
This commit is contained in:
@@ -93,6 +93,8 @@ typedef struct gnDeviceFunctions_t {
|
||||
void (*_gnUpdateBufferUniform)(gnUniform uniform, gnBufferUniformInfo* bufferInfo);
|
||||
|
||||
gnReturnCode (*_gnCreateTexture)(gnTexture texture, gnDevice device, const gnTextureInfo info);
|
||||
void (*_gnTextureData)(gnTextureHandle texture, void* pixelData);
|
||||
void (*_gnDestroyTexture)(gnTexture texture);
|
||||
|
||||
gnReturnCode (*_gnCreateFence)(gnFenceHandle fence, gnOutputDeviceHandle device);
|
||||
void (*_gnSignalFence)(gnFenceHandle fence);
|
||||
|
@@ -94,6 +94,8 @@ void gnLoadDeviceFunctions(struct gnDynamicLibrary_t* lib, struct gnDeviceFuncti
|
||||
gnLoadDLLFunction(lib, functions->_gnDestroyUniformPool, "gnDestroyUniformPoolFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnUpdateBufferUniform, "gnUpdateBufferUniformFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnCreateTexture, "gnCreateTextureFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnTextureData, "gnTextureDataFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnDestroyTexture, "gnDestroyTextureFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnCreateFence, "gnCreateFenceFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnSignalFence, "gnSignalFenceFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnWaitForFence, "gnWaitForFenceFn");
|
||||
|
@@ -6,3 +6,10 @@ gnReturnCode gnCreateTexture(gnTexture* texture, gnDevice device, const gnTextur
|
||||
(*texture)->device = device;
|
||||
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);
|
||||
}
|
||||
|
@@ -23,3 +23,5 @@ struct gnTexture_t {
|
||||
#endif
|
||||
|
||||
gnReturnCode gnCreateTexture(gnTexture* texture, gnDevice device, const gnTextureInfo info);
|
||||
void gnTextureData(gnTextureHandle texture, void* pixelData);
|
||||
void gnDestroyTexture(gnTexture texture);
|
||||
|
Reference in New Issue
Block a user