Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8095336

checkState in BaseShaderContext changes the texture unit currently attached to the context

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • 8
    • 8
    • javafx
    • Mac OS X

      During the work on RT-26702 the following issue was discovered:
      the BaseShaderContext.checkState method does the following calls:
         setTexture(0, tex0);
         setTexture(1, tex1);

      The setTexture method has a side effect of changing the currently attached texture unit for the context. So, the checkState method changes the current TU to 1. I am not sure if it is an intentional side-effect or not, so assigning this to Graphics team for evaluation.

      Before the fix for RT-26702 this did not make any problems, probably because Glass was reassigning the current TU back to 0. However, the fix for RT-26702 changes the way Glass works in rendering on Mac, so this starts to matter.

      To see a problem, you need to apply the double_buffering.patch from RT-26702, open any HelloWorld app with a ComboBox and Modena theme and open/close the ComboBox until you se that the contents of the ComboBox was rendered into the main scene. This problem is resolved by switching setTexture lines, however this is not a proper solution.

            ckyang Chien Yang (Inactive)
            pchelko Petr Pchelko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: