<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi again.<o:p></o:p></p>
<p class="MsoNormal">I’m very new to Mesa, as I said last week, and I have very serious issues about using OpenGL on Linux.<o:p></o:p></p>
<p class="MsoNormal">The OpenGL code I wrote works fine on Windows, but has several issues on Linux.<br>
As I have already said, I’m using a VM Linux machine, and when I run my OpenGL application, it prints out this:<br>
<br>
Vendor : VMware, Inc.<o:p></o:p></p>
<p class="MsoNormal">Renderer : Gallium 0.4 on llvmpipe (LLVM 3.6, 256 bits)<o:p></o:p></p>
<p class="MsoNormal">OpenGL Version : 2.1 Mesa 11.0.7 <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So, yes, it is using a software emulation of OpenGL.<o:p></o:p></p>
<p class="MsoNormal">My application creates a QGLWidget with a default rendering context (so, double buffered).<br>
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.<br>
The significant fragment of my code is this (NOTE THAT I’M EXCLUDING THE REAL COPY OF THE BUFFER HERE BELOW, BECAUSE<br>
I’VE DISCOVERED THAT THE ISSUE IS TRIGGERED MUCH SIMPLY EVEN WITHOUT PERFORMING THE COPY).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> GLint drawBuf[1];<o:p></o:p></p>
<p class="MsoNormal"> glGetIntegerv(GL_DRAW_BUFFER, drawBuf);<o:p></o:p></p>
<p class="MsoNormal"> GLint readBuf[1];<o:p></o:p></p>
<p class="MsoNormal"> glGetIntegerv(GL_READ_BUFFER, readBuf);<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <span style="background:yellow;mso-highlight:yellow">
glReadBuffer(GL_FRONT);</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> // HERE THERE SHOULD BE THE CODE THAT COPIES A PART OF THE FRONT BUFFER INTO THE BACK BUFFER<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> glReadBuffer(readBuf[0]);<o:p></o:p></p>
<p class="MsoNormal"> glFinish();<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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<br>
was GL_BACK, as I could verify).<br>
But, once this code is executed, then on next refresh in graphics the screen starts flickering.<o:p></o:p></p>
<p class="MsoNormal">Basically, the call that causes the issue is that in yellow (if I comment it out, the issue disappears).<o:p></o:p></p>
<p class="MsoNormal">Any idea why? Is it a bug in Mesa?<o:p></o:p></p>
<p class="MsoNormal">Above code works fine on Win, as I said.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Gianluca Natale<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>