From c3c13d7fd456dac2d6e5da1ae392d246a961986b Mon Sep 17 00:00:00 2001 From: Emmanuel Puybaret Date: Sun, 30 Oct 2016 13:03:48 -0700 Subject: j3dcore: fix leftover texture mapping coords when some attributes unset Fixes Bug 1006: https://jogamp.org/bugzilla/show_bug.cgi?id=1006 Signed-off-by: Harvey Harrison --- src/javax/media/j3d/JoglPipeline.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/javax/media/j3d/JoglPipeline.java b/src/javax/media/j3d/JoglPipeline.java index b29048f..269512b 100644 --- a/src/javax/media/j3d/JoglPipeline.java +++ b/src/javax/media/j3d/JoglPipeline.java @@ -7694,7 +7694,11 @@ static boolean hasFBObjectSizeChanged(JoglDrawable jdraw, int width, int height) gl.glEnable(GL.GL_BLEND); gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA); - gl.glEnable(GL.GL_TEXTURE_2D); + gl.glEnable(GL.GL_TEXTURE_2D); + gl.glPushAttrib(GL2.GL_TRANSFORM_BIT); + gl.glMatrixMode(GL.GL_TEXTURE); + gl.glLoadIdentity(); + gl.glPopAttrib(); // loaded identity modelview and projection matrix gl.glMatrixMode(GL2.GL_PROJECTION); -- cgit v1.2.3