jogl
  1. jogl
  2. JOGL-258

GtkLookAndFeel breaks GLSL shader

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Incomplete
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: jogl
    • Labels:
      None
    • Environment:

      Operating System: Linux
      Platform: PC

    • Issuezilla Id:
      258

      Description

      Ok, this is completely insane. Please believe me anyway.
      I have a simple program which draws two triangles using jogl.
      Triangle A uses gl.glColor3d(0.9, 1.0, 0);
      Triangle B uses a glsl shader.
      Triangle B's fragment shader looks like this:
      void main()
      {
      gl_FragColor=vec4(0.9,1.0,0.0,1.0);
      }

      When I run the program normally, both triangles are yellow.
      If I run it with javaws, triangle B (the glsl triangle) is green!
      In fact, every color value < 1.0 (in the fragment shader !!) is treated as 0.0
      when I run the application with javaws.

      I could track the problem back to
      GtkLookAndFeel.initialize() which is called by javaws.
      When I add new GtkLookAndFeel().initialize() as the first line of my
      application, triangle B is also green when I run it directly with java (without
      javaws). Reverting to MetalLookAndFeel does not help.

      How the hell can GtkLookAndFeel break a glsl shader???

      jdk 1.6.0-b105 linux i386
      ati-drivers-8.32.5
      jogl-1.1.0-pre-20061215-linux-i586

        Activity

        Hide
        yug added a comment -

        UNIXToolkit.checkGTK() seems to be sufficient to mess the colors up

        Show
        yug added a comment - UNIXToolkit.checkGTK() seems to be sufficient to mess the colors up
        Hide
        kbr added a comment -

        That's pretty weird. I haven't had time to test this yet but I strongly suspect
        this is a bug in ATI's Linux graphics drivers. I don't think it can be anything
        else since I doubt either the JDK or Gtk use OpenGL at all in the default case,
        and even if they were, JOGL uses its own independent GLContext which should not
        be able to interfere with any other one and vice versa.

        I strongly recommend you put up a Java Web Startable test case and file a bug
        with ATI. I may be able to get you into the ATI Linux beta program to file these
        bugs more directly; please contact me via email if you'd like to try to join it.

        Show
        kbr added a comment - That's pretty weird. I haven't had time to test this yet but I strongly suspect this is a bug in ATI's Linux graphics drivers. I don't think it can be anything else since I doubt either the JDK or Gtk use OpenGL at all in the default case, and even if they were, JOGL uses its own independent GLContext which should not be able to interfere with any other one and vice versa. I strongly recommend you put up a Java Web Startable test case and file a bug with ATI. I may be able to get you into the ATI Linux beta program to file these bugs more directly; please contact me via email if you'd like to try to join it.
        Hide
        kbr added a comment -

        This bug has been sitting around for a while with no action. Since I can't
        believe JOGL is responsible for this in any way I'm closing it as invalid.

        Show
        kbr added a comment - This bug has been sitting around for a while with no action. Since I can't believe JOGL is responsible for this in any way I'm closing it as invalid.

          People

          • Assignee:
            jogl-issues
            Reporter:
            yug
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: