[GLExtensions] Missed a couple USE_GLES3 compile time differences.
This commit is contained in:
parent
95ab2380c9
commit
45dfa3a481
|
@ -56,7 +56,8 @@ static u32 s_NextStage;
|
||||||
|
|
||||||
bool SaveTexture(const std::string filename, u32 textarget, u32 tex, int virtual_width, int virtual_height, unsigned int level)
|
bool SaveTexture(const std::string filename, u32 textarget, u32 tex, int virtual_width, int virtual_height, unsigned int level)
|
||||||
{
|
{
|
||||||
#ifndef USE_GLES3
|
if (GLInterface->GetMode() != GLInterfaceMode::MODE_OPENGL)
|
||||||
|
return false;
|
||||||
int width = std::max(virtual_width >> level, 1);
|
int width = std::max(virtual_width >> level, 1);
|
||||||
int height = std::max(virtual_height >> level, 1);
|
int height = std::max(virtual_height >> level, 1);
|
||||||
u8* data = new u8[width * height * 4];
|
u8* data = new u8[width * height * 4];
|
||||||
|
@ -76,9 +77,6 @@ bool SaveTexture(const std::string filename, u32 textarget, u32 tex, int virtual
|
||||||
bool success = TextureToPng(data, width * 4, filename, width, height, true);
|
bool success = TextureToPng(data, width * 4, filename, width, height, true);
|
||||||
delete[] data;
|
delete[] data;
|
||||||
return success;
|
return success;
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureCache::TCacheEntry::~TCacheEntry()
|
TextureCache::TCacheEntry::~TCacheEntry()
|
||||||
|
@ -153,7 +151,6 @@ TextureCache::TCacheEntryBase* TextureCache::CreateTexture(unsigned int width,
|
||||||
gl_iformat = GL_RGBA;
|
gl_iformat = GL_RGBA;
|
||||||
gl_type = GL_UNSIGNED_BYTE;
|
gl_type = GL_UNSIGNED_BYTE;
|
||||||
break;
|
break;
|
||||||
#ifndef USE_GLES3
|
|
||||||
case PC_TEX_FMT_I4_AS_I8:
|
case PC_TEX_FMT_I4_AS_I8:
|
||||||
gl_format = GL_LUMINANCE;
|
gl_format = GL_LUMINANCE;
|
||||||
gl_iformat = GL_INTENSITY4;
|
gl_iformat = GL_INTENSITY4;
|
||||||
|
@ -177,7 +174,6 @@ TextureCache::TCacheEntryBase* TextureCache::CreateTexture(unsigned int width,
|
||||||
gl_iformat = GL_LUMINANCE8_ALPHA8;
|
gl_iformat = GL_LUMINANCE8_ALPHA8;
|
||||||
gl_type = GL_UNSIGNED_BYTE;
|
gl_type = GL_UNSIGNED_BYTE;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case PC_TEX_FMT_RGB565:
|
case PC_TEX_FMT_RGB565:
|
||||||
gl_format = GL_RGB;
|
gl_format = GL_RGB;
|
||||||
gl_iformat = GL_RGB;
|
gl_iformat = GL_RGB;
|
||||||
|
|
Loading…
Reference in New Issue