The only difference then is that the multi-color path sets the texture mode to GL_MODULATE (and passes an array of colors), while the other uses the GL_REPLACE mode. Point sprites are an obscure feature in OpenGL, so it's not surprising that a linux driver would fail in certain cases. Not sure how we can work around this. Have you tried updating your driver?<br>
<br>Michael<br><br><div class="gmail_quote">On Thu, Oct 25, 2012 at 12:58 PM, Tomas Sieger <span dir="ltr"><<a href="mailto:tomas.sieger@seznam.cz" target="_blank">tomas.sieger@seznam.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Thu, Oct 25, 2012 at 12:36 AM, Michael Lawrence<br>
<<a href="mailto:lawrence.michael@gene.com">lawrence.michael@gene.com</a>> wrote:<br>
><br>
><br>
> On Wed, Oct 24, 2012 at 1:18 PM, Tomas Sieger <<a href="mailto:tomas.sieger@seznam.cz">tomas.sieger@seznam.cz</a>><br>
> wrote:<br>
>><br>
>> I've tracked the problem down a little bit deeper.<br>
>><br>
>> I wanted to add some "use opengl" option to cranvas, but realized that<br>
>> some cranvas plots using glyphs *do* work even if using opengl. I<br>
>> found out that glyphs that specify stroke color as a vector of length<br>
>> at least two (!) work:<br>
>> qdrawGlyph(painter,<br>
>> qglyphCircle(r=5),5,5,stroke=rep('#FF0000FF',2)) # works<br>
>> while those that specify stroke color as a single value do not:<br>
>> qdrawGlyph(painter,<br>
>> qglyphCircle(r=5),5,5,stroke=rep('#FF0000FF',1)) # does not work<br>
>> as well as those without an explicit stroke color:<br>
>> qdrawGlyph(painter, qglyphCircle(r=5),5,5) # does not work<br>
>><br>
>> The length of the stroke color argument really makes a difference. If<br>
>> it is a vector of length >=2, stroke colors get passed to painters<br>
>> explicitly. If it is a single value, it sets the default color in the<br>
>> painter. In the first case, OpenGLPainter draws glyphs explicitly (and<br>
>> the glyph gets rendered correctly). In the latter case, the<br>
>> OpenGLPainter delegates the call to QtBasePainter::drawGlyphs (and the<br>
>> glyph gets not rendered).<br>
>><br>
>> It makes me feel this might be a SW issue, not necessarily a HW one.<br>
>><br>
><br>
> Thanks a lot for looking into this in depth. Yes, there are two code paths<br>
> that use the hardware differently. The multi-color case is actually the more<br>
> complicated one, using modulation to color the same texture many times, so<br>
> it's surprising that it works, while the simpler case is broken. One<br>
> possible test is to use white, so that the glyph image is exactly the same<br>
> in both cases. That would eliminate one difference at least.<br>
<br>
</div></div>The problem persists even for white glyphs.<br>
(I'm setting red background using<br>
scene$setBackgroundBrush(Qt$QBrush(Qt$QColor('red'))) and drawing<br>
white glyphs. "qdrawGlyph(painter,<br>
qglyphCircle(r=5),5:7,5:7,stroke=rep('#FFFFFFFF',1))" get not<br>
rendered.)<br>
<span class="HOEnZb"><font color="#888888"><br>
Tomas<br>
</font></span></blockquote></div><br>