Page 1 of 1

createScreenShot GLES2

Posted: Thu Jun 18, 2020 10:16 am
by wolfgang
Hi,

When using createScreenShot red and blue channels are mixed up in GLES2 (tested on Linux). I currently use a workaround in COGLES2Driver::createScreenShot by switching these channels back afterwards:

Code: Select all

 
        for(u32 x=0; x<ScreenSize.Width; x++){
            for(u32 y=0; y<ScreenSize.Height; y++){
                SColor c = newImage->getPixel(x,y);
                newImage->setPixel(x,y,SColor(c.getAlpha(), c.getBlue(), c.getGreen(), c.getRed()));
            }
        }
 
I currently have no idea why they are wrong in the first place. Perhaps there's a better fix for this. Any ideas?

Re: createScreenShot GLES2

Posted: Thu Jun 18, 2020 8:07 pm
by CuteAlien
Sorry, can't help right now.

I noticed last weekend I'm currently getting those errors when trying to use ES2 on Linux:
X Error: BadMatch (invalid parameter attributes)
From call : X_PutImage
Still have to find time to debug what's suddenly going on with that. Either I broke something in Irrlicht or it's again some new Debian troubles.

I'll check as soon as I'm back to a working ES2 system.

Re: createScreenShot GLES2

Posted: Sun Jun 21, 2020 3:08 pm
by CuteAlien
Not looking good. All ES2 programs no longer run on my Debian system. I get an "libEGL warning: DRI2: failed to authenticate" thought not sure if that's the reason. This message seems to be from eglInitialize, but that still returns true, so doesn't claim to fail. eglGetError also not returning any errors. But other functions like glGetString(GL_VERSION) also just return 0 (again without creating any errors).

My guess is - some change in Debian broke nvidia es2 support. I asked around a bit in OpenGL and Debian IRC channels, but so far didn't find anyone who had a clue what's going on.

Without testing ES 2 on the desktop it will be really hard to develop the gl_es branch (testing everything on Android is rather painful). Don't know how to continue right now. If anyone got an idea about those errors - I'm open to all ideas.

Re: createScreenShot GLES2

Posted: Mon Jun 22, 2020 7:52 am
by wolfgang
I've recently sucessfully used it with Ubuntu 20.04 and an old NVidia card. Perhaps you want to give Ubuntu a try?

Btw: Are you using the proprietary drivers or are you using nouveau? Perhaps switching the drivers might help?

Re: createScreenShot GLES2

Posted: Mon Jun 22, 2020 10:05 am
by CuteAlien
Hm, not a big fan of Ubuntu, but got it installed on Laptop, so I can give it a shot. Just not a long-term solution as I don't like development there much (small screen, not so great keyboard, old Laptop). I'm using the proprietary driver, Nouveau never worked well for my card (especially for 3D), thought I haven't given it a shot in a year or so. This driver & card worked with ES2 in the past, but I haven't done ES2 development in a while, so likely that was back in Debian 9. I should probably report the bug, but after failing twice to get Debians state-of-the-art-in-the-nineties bugreporting tool to actually send out my bugreport I gave up on that yesterday as well. Only so much one can take-on on a sunday afternoon.