java3d
  1. java3d
  2. JAVA3D-640

setDepthTestFunction do not work with the D3D renderer

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: not determined
    • Component/s: j3d-core
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      640

      Description

      RenderingAttributes.setDepthTestFunction do not work with the D3D renderer. See
      the attached test case for an example on how to reproduce the bug.

      FIX:
      In the "void JNICALL
      Java_javax_media_j3d_NativePipeline_updateRenderingAttributes" method in
      Attributes.c:

      if (!db_enable_override)
      {
      if (db_enable)

      { d3dCtx->zEnable = TRUE; device->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE); //********* BUG FIX START ******************* device->SetRenderState(D3DRS_ZFUNC, getDepthFunc(db_func)); //********* BUG FIX END }

      else

      { d3dCtx->zEnable = FALSE; device->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE); }

      }

      Here is the relevant working ogl code:
      if (db_enable_override == JNI_FALSE) {
      if (db_enable == JNI_TRUE)

      { glEnable(GL_DEPTH_TEST); glDepthFunc( getFunctionValue(db_func)); }

      else

      { glDisable(GL_DEPTH_TEST); }

      }

        Activity

        Hide
        lamer77 added a comment -

        Created an attachment (id=386)
        Reproduces setDepthTestFunction bug with D3D renderer

        Show
        lamer77 added a comment - Created an attachment (id=386) Reproduces setDepthTestFunction bug with D3D renderer
        Hide
        aces added a comment -

        Thank for detailed report.
        I'll perform some tests before committing fix to 1.6.0 branch.

        Show
        aces added a comment - Thank for detailed report. I'll perform some tests before committing fix to 1.6.0 branch.
        Hide
        aces added a comment -

        Thanks lamer77 !
        Issue fixed and committed to branch dev-1_6

        Show
        aces added a comment - Thanks lamer77 ! Issue fixed and committed to branch dev-1_6

          People

          • Assignee:
            java3d-issues
            Reporter:
            lamer77
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: