R: another serious issue with OpenGL on Linux

Gianluca Natale <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <DM6PR03MB36749FEA352098D7FF4AE5CA93170@DM6PR03MB3674.namprd03.prod.outlook.com>
Thanks for testing, Brian.

So you don't see any issue if you copy/paste these lines at the end of your "redraw" function, before buffer swapping?
glReadBuffer(GL_FRONT);
glReadBuffer(GL_BACK);
It's really weird that I have such "flickering", because above lines should not do anything at all.
And instead they trigger this "flickering" that I do not understand.

I cannot provide a complete test program, but as you already experienced, the problem very likely wouldn't be reproducible on a simple test program.
So probably there is something else in my application (BTW, we use QGLWidget as the main graphic window,
and OSG to render inside that window; maybe there is some conflicts between them?).
Anyway, regardless of what we use, I still cannot see why changing and restoring "soon" a graphic attribute (the read buffer)
might affect the general behavior of the application.

Anyway, thanks, I really appreciate the time you spent on that.
Gianluca Natale

-----Messaggio originale-----
Da: Brian Paul <[email protected]> 
Inviato: lunedì 24 settembre 2018 17:48
A: Gianluca Natale <[email protected]>; [email protected]
Oggetto: Re: [Mesa-users] another serious issue with OpenGL on Linux

On 09/24/2018 07:26 AM, Gianluca Natale wrote:
> Hi again.
> 
> I'm very new to Mesa, as I said last week, and I have very serious 
> issues about using OpenGL on Linux.
> 
> The OpenGL code I wrote works fine on Windows, but has several issues 
> on Linux.
> As I have already said, I'm using a VM Linux machine, and when I run 
> my OpenGL application, it prints out this:
> 
> Vendor         :     VMware, Inc.
> 
> Renderer       :     Gallium 0.4 on llvmpipe (LLVM 3.6, 256 bits)
> 
> OpenGL Version :     2.1 Mesa 11.0.7
> 
> So, yes, it is using a software emulation of OpenGL.
> 
> My application creates a QGLWidget with a default rendering context 
> (so, double buffered).
> It works fine, until I try to copy a part of the front buffer into the 
> back buffer. From that point on, it starts flickering, as if it 
> renders in the front buffer directly.
> The significant fragment of my code is this (NOTE THAT I'M EXCLUDING 
> THE REAL COPY OF THE BUFFER HERE BELOW, BECAUSE I'VE DISCOVERED THAT 
> THE ISSUE IS TRIGGERED MUCH SIMPLY EVEN WITHOUT PERFORMING THE COPY).
> 
>          GLint drawBuf[1];
> 
>          glGetIntegerv(GL_DRAW_BUFFER, drawBuf);
> 
>          GLint readBuf[1];
> 
>          glGetIntegerv(GL_READ_BUFFER, readBuf);
> 
> glReadBuffer(GL_FRONT);
> 
>          // HERE THERE SHOULD BE THE CODE THAT COPIES A PART OF THE 
> FRONT BUFFER INTO THE BACK BUFFER
> 
>          glReadBuffer(readBuf[0]);
> 
>          glFinish();
> 
> As you can see, the code is very trivial. I simply change the read 
> buffer to GL_FRONT, and soon change it back to the previous value 
> (which was GL_BACK, as I could verify).
> But, once this code is executed, then on next refresh in graphics the 
> screen starts flickering.

I hacked that code into the Mesa gears demo and tested with llvmpipe but didn't see any issue.

Could you possibly supply a complete test program which shows the problem?  Modifying a Mesa/GLUT demo would probably be easiest.

-Brian

> 
> Basically, the call that causes the issue is that in yellow (if I 
> comment it out, the issue disappears).
> 
> Any idea why? Is it a bug in Mesa?
> 
> Above code works fine on Win, as I said.
> 
> Thanks,
> 
> Gianluca Natale
> 
> 
> 
> _______________________________________________
> mesa-users mailing list
> [email protected]
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists
> .freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-users&amp;data=02%7C01%7C
> brianp%40vmware.com%7C6dc6fddf61cb42c929c708d622214cdf%7Cb39138ca3cee4
> b4aa4d6cd83d9dd62f0%7C1%7C0%7C636733923760130662&amp;sdata=Cmghd3A0NO5
> jNlimyhPclWq%2Fs5jY12S5uP4AUJUxPqw%3D&amp;reserved=0
> 

_______________________________________________
mesa-users mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.