Fix compile problems with iPhone target and ogl-es extensions, as reported by grafikrobot.
git-svn-id: http://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@2902 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
477103a05d
commit
540e65604f
@ -2757,12 +2757,18 @@ IImage* COGLES1Driver::createScreenShot()
|
||||
// there are formats we don't support ATM
|
||||
if (GL_UNSIGNED_SHORT_4_4_4_4==type)
|
||||
type=GL_UNSIGNED_SHORT_5_5_5_1;
|
||||
#ifdef GL_EXT_read_format_bgra
|
||||
else if (GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT==type)
|
||||
type=GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT;
|
||||
#endif
|
||||
}
|
||||
|
||||
IImage* newImage = 0;
|
||||
if ((GL_RGBA==format) || (GL_BGRA_EXT==format))
|
||||
if ((GL_RGBA==format)
|
||||
#ifdef GL_EXT_read_format_bgra
|
||||
|| (GL_BGRA_EXT==format)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if (GL_UNSIGNED_BYTE==type)
|
||||
newImage = new CImage(ECF_A8R8G8B8, ScreenSize);
|
||||
|
@ -198,8 +198,10 @@ void COGLES1ExtensionHandler::initExtensions(COGLES1Driver* driver,
|
||||
MaxAnisotropy = static_cast<u8>(val);
|
||||
}
|
||||
#endif
|
||||
#ifdef GL_MAX_ELEMENTS_INDICES
|
||||
glGetIntegerv(GL_MAX_ELEMENTS_INDICES, &val);
|
||||
MaxIndices=val;
|
||||
#endif
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &val);
|
||||
MaxTextureSize=static_cast<u32>(val);
|
||||
#ifdef EXT_texture_lod_bias
|
||||
|
@ -38,7 +38,7 @@ namespace os
|
||||
s16 Byteswap::byteswap(s16 num) {return bswap_16(num);}
|
||||
u32 Byteswap::byteswap(u32 num) {return bswap_32(num);}
|
||||
s32 Byteswap::byteswap(s32 num) {return bswap_32(num);}
|
||||
f32 Byteswap::byteswap(f32 num) {u32 tmp=bswap_32(IR(num)); return (FR(tmp));}
|
||||
f32 Byteswap::byteswap(f32 num) {u32 tmp=IR(num); tmp=bswap_32(tmp); return (FR(tmp));}
|
||||
// prevent accidental byte swapping of chars
|
||||
u8 Byteswap::byteswap(u8 num) {return num;}
|
||||
c8 Byteswap::byteswap(c8 num) {return num;}
|
||||
|
Loading…
x
Reference in New Issue
Block a user