handle other texture formats
This commit is contained in:
parent
f51ad1cf1f
commit
a4cba0f05c
16 changed files with 135 additions and 2 deletions
|
|
@ -44,11 +44,13 @@ class FurnaceMetalTexture: public FurnaceGUITexture {
|
|||
public:
|
||||
id<MTLTexture> tex;
|
||||
int width, height;
|
||||
FurnaceGUITextureFormat format;
|
||||
unsigned char* lockedData;
|
||||
FurnaceMetalTexture():
|
||||
tex(NULL),
|
||||
width(0),
|
||||
height(0),
|
||||
format(GUI_TEXFORMAT_UNKNOWN),
|
||||
lockedData(NULL) {}
|
||||
};
|
||||
|
||||
|
|
@ -57,6 +59,11 @@ ImTextureID FurnaceGUIRenderMetal::getTextureID(FurnaceGUITexture* which) {
|
|||
return t->tex;
|
||||
}
|
||||
|
||||
FurnaceGUITextureFormat FurnaceGUIRenderMetal::getTextureFormat(FurnaceGUITexture* which) {
|
||||
FurnaceMetalTexture* t=(FurnaceMetalTexture*)which;
|
||||
return t->format;
|
||||
}
|
||||
|
||||
bool FurnaceGUIRenderMetal::lockTexture(FurnaceGUITexture* which, void** data, int* pitch) {
|
||||
FurnaceMetalTexture* t=(FurnaceMetalTexture*)which;
|
||||
if (t->lockedData!=NULL) return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue