createScreenShot GLES2

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
wolfgang
Posts: 9
Joined: Mon Jul 01, 2019 8:14 am

createScreenShot GLES2

Post 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?
CuteAlien
Admin
Posts: 9645
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: createScreenShot GLES2

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
CuteAlien
Admin
Posts: 9645
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: createScreenShot GLES2

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
wolfgang
Posts: 9
Joined: Mon Jul 01, 2019 8:14 am

Re: createScreenShot GLES2

Post 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?
CuteAlien
Admin
Posts: 9645
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: createScreenShot GLES2

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply