From 7370d962f8945ac8c3b36bb005d8d0a7f50656c5 Mon Sep 17 00:00:00 2001 From: Emmanuel Puybaret Date: Sun, 30 Oct 2016 12:42:13 -0700 Subject: j3dcore: avoid calls to glColor4f in material reset paths This causes crashes in the Parallels driver, possibly due to the calls occuring on a non-current glContext, this appears to not cause other issues as the glColor calls are always issued before rendering anyway and can avoid being reset here. Signed-off-by: Harvey Harrison --- src/javax/media/j3d/JoglPipeline.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/javax') diff --git a/src/javax/media/j3d/JoglPipeline.java b/src/javax/media/j3d/JoglPipeline.java index 2f38fd8..d528ad7 100644 --- a/src/javax/media/j3d/JoglPipeline.java +++ b/src/javax/media/j3d/JoglPipeline.java @@ -6789,7 +6789,8 @@ void swapBuffers(Canvas3D cv, Context ctx, Drawable drawable) { if (VERBOSE) System.err.println("JoglPipeline.updateMaterialColor()"); GL2 gl = context(ctx).getGL().getGL2(); - gl.glColor4f(r, g, b, a); + // FIXME: Removed call to glColor4f because of segfault issues in Parallels Desktop driver + // gl.glColor4f(r, g, b, a); gl.glDisable(GL2.GL_LIGHTING); } @@ -7218,9 +7219,10 @@ void swapBuffers(Canvas3D cv, Context ctx, Drawable drawable) { GL2 gl = context(ctx).getGL().getGL2(); - if (!enableLight) { - gl.glColor4f(r, g, b, a); - } + if (!enableLight) { + // FIXME: Removed call to glColor4f because of segfault issues in Parallels Desktop driver + // gl.glColor4f(r, g, b, a); + } gl.glShadeModel(GL2.GL_SMOOTH); } -- cgit v1.2.3