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

glAlphaFunc not part of GLES

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • javafx


      I noticed this while looking at symbols tables.

      glAlphaFunc does not seem to be defined as part of GLES but is used in nSetDepthTest, and so is pulled into the GLES prism impl.

      I think that we have not noticed it because we don't force our libraries to fully resolve symbols at build time, but this should be a fatal error if used at runtime.

      src/GLContext.c

      JNIEXPORT void JNICALL Java_com_sun_prism_es2_gl_GLContext_nSetDepthTest
      (JNIEnv *env, jclass class, jlong nativeCtxInfo, jboolean depthTest) {
          ContextInfo *ctxInfo = (ContextInfo *) jlong_to_ptr(nativeCtxInfo);
          if (ctxInfo == NULL) {
              return;
          }

          if (depthTest) {
              glEnable(GL_DEPTH_TEST);
              glDepthFunc(GL_LEQUAL);
              glDepthMask(GL_TRUE);
              ctxInfo->depthWritesEnabled = JNI_TRUE;
              glEnable(GL_ALPHA_TEST);
              glAlphaFunc(GL_NOTEQUAL, 0.0); <<<<<<<<<<<<<<<<<<<<<<<<<<
          } else {
              glDisable(GL_DEPTH_TEST);
              glDepthMask(GL_FALSE);
              ctxInfo->depthWritesEnabled = JNI_FALSE;
              glDisable(GL_ALPHA_TEST);
          }
      }

            ckyang Chien Yang (Inactive)
            ddhill David Hill (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: