prepare to handle other texture formats

required for DirectX 9...
This commit is contained in:
tildearrow 2024-05-15 02:48:18 -05:00
parent 540cbbd129
commit 394d5d6583
22 changed files with 131 additions and 24 deletions

View file

@ -92,7 +92,11 @@ bool FurnaceGUIRenderGL1::updateTexture(FurnaceGUITexture* which, void* data, in
return true;
}
FurnaceGUITexture* FurnaceGUIRenderGL1::createTexture(bool dynamic, int width, int height, bool interpolate) {
FurnaceGUITexture* FurnaceGUIRenderGL1::createTexture(bool dynamic, int width, int height, bool interpolate, FurnaceGUITextureFormat format) {
if (format!=GUI_TEXFORMAT_ABGR32) {
logE("unsupported texture format!");
return NULL;
}
FurnaceGL1Texture* t=new FurnaceGL1Texture;
C(glGenTextures(1,&t->id));
C(glBindTexture(GL_TEXTURE_2D,t->id));
@ -221,6 +225,10 @@ int FurnaceGUIRenderGL1::getMaxTextureHeight() {
return maxHeight;
}
unsigned int FurnaceGUIRenderGL1::getTextureFormats() {
return GUI_TEXFORMAT_ABGR32;
}
const char* FurnaceGUIRenderGL1::getBackendName() {
return "OpenGL 1.1";
}