* Bug #13673 fixed - Anti-aliasing of xpoly marks did not render correctly. 82/15582/3
Clément DAVID [Mon, 24 Nov 2014 08:24:52 +0000 (09:24 +0100)]
Thanks to Ross Piltz <ripley_scilab@yahoo.com.au> for the report and
fix.

Change-Id: I0983ef21bb284c0ec1c9fc8ae5ff75cfee85f83c

scilab/CHANGES_5.5.X
scilab/modules/scirenderer/src/org/scilab/forge/scirenderer/implementation/jogl/texture/JoGLTextureManager.java

index 3b43bae..d36d6d4 100644 (file)
@@ -20,6 +20,11 @@ Removed Functions
 
 * milk_drop removed.
 
+Scilab Bug Fixes
+================
+
+* Bug #13673 fixed - Anti-aliasing of xpoly marks did not render correctly.
+
                      Changes between version 5.5.0 and 5.5.1
                      =======================================
 
index 4ad3a22..71876e1 100644 (file)
@@ -201,7 +201,7 @@ public class JoGLTextureManager implements TextureManager {
                 if (textures.length == 1) {
                     gl.glEnable(GL2.GL_TEXTURE_2D);
                     gl.glEnable(GL2.GL_BLEND);
-                    gl.glBlendFunc(GL2.GL_ONE, GL2.GL_ONE_MINUS_SRC_ALPHA);
+                    gl.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE_MINUS_SRC_ALPHA);
                     gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_REPLACE);
 
                     textures[0].setTexParameteri(gl, GL2.GL_TEXTURE_MAG_FILTER, getAsGLFilter(getMagnificationFilter(), false));
@@ -352,7 +352,9 @@ public class JoGLTextureManager implements TextureManager {
 
             gl.glEnable(GL2.GL_TEXTURE_2D);
             gl.glEnable(GL2.GL_BLEND);
-            gl.glBlendFunc(GL2.GL_ONE, GL2.GL_ONE_MINUS_SRC_ALPHA);
+
+            // ONE => SRC_ALPHA (fix for bug 13673)
+            gl.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE_MINUS_SRC_ALPHA);
 
             gl.glEnable(GL2.GL_ALPHA_TEST);
             gl.glAlphaFunc(GL2.GL_GREATER, 0.0f);