Fix the BGRA extension recognition (or whichever extension comes last in the extension string). With latest emulator also colorkey works.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@2371 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
d101418b56
commit
e7fcfef180
|
@ -383,8 +383,8 @@ bool COGLES1Driver::beginScene(bool backBuffer, bool zBuffer, SColor color,
|
|||
#if defined(GL_VERSION_ES_CM_1_0)
|
||||
#if defined(_IRR_USE_IPHONE_DEVICE_)
|
||||
(*Device.displayBegin)(&Device);
|
||||
#endif
|
||||
glBindFramebufferOES(GL_FRAMEBUFFER_OES, ViewFramebuffer);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
GLbitfield mask = 0;
|
||||
|
|
|
@ -132,11 +132,13 @@ void COGLES1ExtensionHandler::initExtensions(COGLES1Driver* driver,
|
|||
core::stringc extensions = glGetString(GL_EXTENSIONS);
|
||||
os::Printer::log(extensions.c_str());
|
||||
{
|
||||
c8* str = new c8[extensions.size()+1];
|
||||
strncpy(str, extensions.c_str(), extensions.size()+1);
|
||||
const u32 size = extensions.size()+1;
|
||||
c8* str = new c8[size];
|
||||
strncpy(str, extensions.c_str(), extensions.size());
|
||||
str[extensions.size()]=' ';
|
||||
c8* p = str;
|
||||
|
||||
for (u32 i=0; i<extensions.size(); ++i)
|
||||
for (u32 i=0; i<size; ++i)
|
||||
{
|
||||
if (str[i] == ' ')
|
||||
{
|
||||
|
@ -159,7 +161,7 @@ void COGLES1ExtensionHandler::initExtensions(COGLES1Driver* driver,
|
|||
}
|
||||
#ifndef GL_BGRA
|
||||
// whoa, pretty badly implemented extension...
|
||||
if (FeatureAvailable[IRR_IMG_texture_format_BGRA8888])
|
||||
if (FeatureAvailable[IRR_IMG_texture_format_BGRA8888] || FeatureAvailable[IRR_EXT_texture_format_BGRA8888])
|
||||
GL_BGRA=0x80E1;
|
||||
else
|
||||
GL_BGRA=GL_RGBA;
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace video
|
|||
{
|
||||
public:
|
||||
enum EOGLESFeatures {
|
||||
IRR_AMD_compressed_3DC_texture, //39
|
||||
IRR_AMD_compressed_3DC_texture=0, //39
|
||||
IRR_AMD_compressed_ATC_texture, //40
|
||||
IRR_AMD_performance_monitor, //50
|
||||
IRR_AMD_program_binary_Z400, //48
|
||||
|
|
Loading…
Reference in New Issue