[D3D 3D] Need a robust 3D states management for texture

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P5
    • tbd
    • Affects Version/s: 8
    • Component/s: javafx

      The current 3D states management for texture is quite problematic. The texture states in set at the beginning for the 2D to 3D state switch. It is better to follow the approach of es2 pipe where the texture states is set when a texture object is used.


      See D3DContext.cc :
      setDeviceParametersFor3D() {
      ...
              // Set texture unit 0 to its default texture addressing mode for Prism
              SUCCEEDED(res = pd3dDevice->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP)) &&
              SUCCEEDED(res = pd3dDevice->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP)) &&
              // Set texture filter to bilinear for 3D rendering
              SUCCEEDED(res = pd3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR)) &&
              SUCCEEDED(res = pd3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR));

            Assignee:
            Unassigned
            Reporter:
            Chien Yang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Imported: