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

Check for GL_OES_texture_npot extension

XMLWordPrintable

      The non-power-of-two extension available on OpenGL ES 2.0 is GL_OES_texture_npot. We should check for that extension as well as the desktop NPOT extension:

      --- a/prism-es2/src/com/sun/prism/es2/GLContext.java Sun May 12 18:07:35 2013 +0300
      +++ b/prism-es2/src/com/sun/prism/es2/GLContext.java Sun May 12 21:16:27 2013 +0300
      @@ -252,7 +252,8 @@
                    * GLContext class. */
                   nonPowTwoExtAvailable = PrismSettings.forcePow2
                       ? Boolean.FALSE
      - : ES2Pipeline.glFactory.isGLExtensionSupported("GL_ARB_texture_non_power_of_two");
      + : (ES2Pipeline.glFactory.isGLExtensionSupported("GL_ARB_texture_non_power_of_two")
      + || ES2Pipeline.glFactory.isGLExtensionSupported("GL_OES_texture_npot"));
               }
               return nonPowTwoExtAvailable.booleanValue();
           }

      This gets us better rendering performance on the Pi.

            ckyang Chien Yang (Inactive)
            dblaukop Daniel Blaukopf (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: