<div dir="ltr">I believe that might be because of push and pop attributes in older GL. I updated the the mantis (I hope I did it right -:)). <div><br></div><div>Thanks Simon. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 23, 2015 at 4:32 AM, Simon ESNEAULT <span dir="ltr"><<a href="mailto:simon.esneault@gmail.com" target="_blank">simon.esneault@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<br><br>Thanks for merging this.<br><br>As a side note, I believe the same is true for the old backend, because the function vtkOpenGLRayCastImageDisplayHelper::RenderTextureInternal(  ... ) does also modify the blend state without restoring it. But somehow, the 2D texture are correctly drawn with the old backend ...<br><br>Mantis bugs :<br><a href="http://www.vtk.org/Bug/view.php?id=15838" target="_blank">http://www.vtk.org/Bug/view.php?id=15838</a><br><div>and </div><div><a href="http://www.vtk.org/Bug/view.php?id=15812" target="_blank">http://www.vtk.org/Bug/view.php?id=15812</a><br></div><div><br></div><div>can now be closed :)<br><br>Thanks</div><span class="HOEnZb"><font color="#888888"><div>Simon</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-11-21 2:39 GMT+01:00 Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Simon, <div><br></div><div>You branch has been merged: <a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/932" target="_blank">https://gitlab.kitware.com/vtk/vtk/merge_requests/932</a>. Thank for the patch. </div><span><font color="#888888"><div><br></div><div>- Aashish</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 20, 2015 at 9:37 AM, Ken Martin <span dir="ltr"><<a href="mailto:ken.martin@kitware.com" target="_blank">ken.martin@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That is the standard blend save/restore code so I think that should do the trick. Thanks for digging into it.</div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Fri, Nov 20, 2015 at 8:32 AM, Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi Simon, <div><br></div><div>Thanks! I am okay with merging this change but in general restoring to previous state is tricky as for that you need to know the previous state. I think restoring to a default state (which you did) makes more sense. Although in VTK we don't have clear guideline on this. I am reviewing your changes..</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 20, 2015 at 8:26 AM, Simon ESNEAULT <span dir="ltr"><<a href="mailto:simon.esneault@gmail.com" target="_blank">simon.esneault@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<br><br>I've created a merge request for this bug : <br><a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/932" target="_blank">https://gitlab.kitware.com/vtk/vtk/merge_requests/932</a><br><br>The class vtkOpenGLRayCastImageDisplayHelper is changing OpenGL blend state, but never restores the state as it was before, resulting in some incorrect blend later.<br>I don't know if it's the correct fix, but it certainly look like the reason for this bug, and it solve the bug here.<br>Can someone review this merge ?<br><br>Regards<span><font color="#888888"><br>Simon<br><br></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-18 9:38 GMT+01:00 Simon ESNEAULT <span dir="ltr"><<a href="mailto:simon.esneault@gmail.com" target="_blank">simon.esneault@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Morning !<br><br><a href="http://www.vtk.org/Bug/view.php?id=15838" target="_blank">http://www.vtk.org/Bug/view.php?id=15838</a><br><br>Let me know if there is anything I can do to solve this.<span><font color="#888888"><br><br>Simon</font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-17 16:50 GMT+01:00 Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Nov 17, 2015 at 3:36 AM, Simon ESNEAULT <span dir="ltr"><<a href="mailto:simon.esneault@gmail.com" target="_blank">simon.esneault@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Aashish,<br><br>Yes the root cause is probably located in vtkTexturedActor2D, or in vtkOpenGLTexture::Load( vtkRenderer* ) which looks like the responsible class for loading the texture.<br>Shall I fill a bug ?<br></div></blockquote><div><br></div></span><div>Yes, please. </div><span><font color="#888888"><div><br></div><div>- Aashish</div></font></span><div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks<span><font color="#888888"><br>Simon</font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-16 17:49 GMT+01:00 Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I see so its not just related to volume rendering and it seems to be a vtkTextActor2D problem? In that can probably Ken / David Lonie wants to take a look at it. Nonetheless, we will follow up on this bug. <span><font color="#888888"><div><br></div><div>- Aashish</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT <span dir="ltr"><<a href="mailto:simon.esneault@gmail.com" target="_blank">simon.esneault@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Aashish,<br><br>Thanks !<br>After doing some test, I realized the patch I've just sent is not the correct fix at all, because the text is not rendered properly when we don't use a vtkFixedPointVolumeRayCastMapper anymore.<br><br>I believe the problem is probably larger than this and probably has nothing to do with the freetype text generation, but more with the vtkTexturedActor2D rendering part used together with a vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the texture has some transparent pixel in it ...<br><br>Attached there is a new example that demonstrate that a vtkTextActor AND a vtkTexturedButtonRepresentation2D are not correctly drawn in that case :<br>- <a href="http://picpaste.com/pics/OGL1-Texture-okay.1447690100.png" target="_blank">OpenGL1 backend</a> : Transparent pixel in Texture are correctly drawn<div>- <a href="http://picpaste.com/pics/OGL2-Texture-not-okay.1447690272.png" target="_blank">OpenGL2 backend</a> : Transparent pixel in Texture are not correctly drawn (clamped to white ?)<br><br></div><div>The example is more simple than the previous one and does not need any additional data.<br><br>Hope that helps !<span><font color="#888888"><br>-Simon</font></span></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-16 16:11 GMT+01:00 Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Simon, <div><br></div><div>Thanks for the report. I will follow up with other developers on this bug. </div><div><br></div><div>- Aashish</div><div><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT <span dir="ltr"><<a href="mailto:simon.esneault@gmail.com" target="_blank">simon.esneault@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hello,<br><br>Trying to solve this problem, I found out that if one call "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a string with a vtkTextActor, the text is properly rendered with a yellow dot at the anchor point, and with a transparent gray background.<div><div>- DebugTexturesOn : <a href="http://picpaste.com/pics/Blurred.1447668943.PNG" target="_blank">http://picpaste.com/pics/Blurred.1447668943.PNG</a><br>- DebugTexturesOff : <a href="http://picpaste.com/pics/Not-Blurred.1447669009.PNG" target="_blank">http://picpaste.com/pics/Not-Blurred.1447669009.PNG</a><br><br>Now digging into the code in vtkFreeTypeTools.cxx, I suspect this is a blending problem. When we activate Texture Debugging, a gray background is first drawn, and after that in the method RenderCharacter( ... ) line 1887; we either blend the rendered text with the background or not.</div><div><br>Attached is a diff file that solves the problem for me. I do not really understand why, so maybe a developer with more VTK's knowledge can integrate this properly :)<br><br>Thanks,<br>Simon</div></div><div><br></div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-13 16:43 GMT+01:00 Simon ESNEAULT <span dir="ltr"><<a href="mailto:simon.esneault@gmail.com" target="_blank">simon.esneault@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All,<br><br>All vtkTextActor are rendered blurred when using with vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the new rendering backend.<div><br></div><div>Here are some snapshots :<br> - <a href="http://picpaste.com/pics/OGL1-not-blurred.1447428990.png" target="_blank">OpenGL1</a></div><div> - <a href="http://picpaste.com/pics/OGL2-blurred.1447429027.png" target="_blank">OpenGL2</a><br><br>Attached some code that reproduces the problem, to be used with <a href="https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip" target="_blank">this</a> volume. Visible on OSX and Windows to our knowledge, probably on more OS.<br><br>The text is rendered properly when used with the old backend or when using a vtkGPUVolumeRayCastMapper instead of the vtkFixedPointVolumeRayCastMapper.<br><br>Shall I feel a bug, is this a known issue ?<br><br>Thanks,<br>Simon<span><font color="#888888"><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>------------------------------------------------------------------<br>Simon Esneault<div>Rennes, France<br>------------------------------------------------------------------</div></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>------------------------------------------------------------------<br>Simon Esneault<div>Rennes, France<br>------------------------------------------------------------------</div></div></div></div>
</div>
</div></div><br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader         <br>| Kitware Inc.            <br></i></font><div><i><font face="trebuchet ms, sans-serif">| </font><a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
</font></span></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>------------------------------------------------------------------<br>Simon Esneault<div>Rennes, France<br>------------------------------------------------------------------</div></div></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader         <br>| Kitware Inc.            <br></i></font><div><i><font face="trebuchet ms, sans-serif">| </font><a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>------------------------------------------------------------------<br>Simon Esneault<div>Rennes, France<br>------------------------------------------------------------------</div></div></div></div>
</div>
</div></div></blockquote></div></div></div><div><div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader         <br>| Kitware Inc.            <br></i></font><div><i><font face="trebuchet ms, sans-serif">| </font><a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
</div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>------------------------------------------------------------------<br>Simon Esneault<div>Rennes, France<br>------------------------------------------------------------------</div></div></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><span><font color="#888888"><div><br></div>-- <br><div><div dir="ltr"><div>------------------------------------------------------------------<br>Simon Esneault<div>Rennes, France<br>------------------------------------------------------------------</div></div></div></div>
</font></span></div><span><font color="#888888">
</font></span></div></div></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader         <br>| Kitware Inc.            <br></i></font><div><i><font face="trebuchet ms, sans-serif">| </font><a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
</font></span></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br></div></div>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><span><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
</span><a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Ken Martin PhD<div>Chairman & CFO<br>Kitware Inc.<br>28 Corporate Drive<br>Clifton Park NY 12065<br><a href="tel:518%20371%203971" value="+15183713971" target="_blank">518 371 3971</a><div><br></div><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee.  Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message. 
Thank you.</span></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader         <br>| Kitware Inc.            <br></i></font><div><i><font face="trebuchet ms, sans-serif">| </font><a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>------------------------------------------------------------------<br>Simon Esneault<div>Rennes, France<br>------------------------------------------------------------------</div></div></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader         <br>| Kitware Inc.            <br></i></font><div><i><font face="trebuchet ms, sans-serif">| </font><a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
</div>