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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P5 P5
    • tbd
    • 8
    • 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));

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

              Created:
              Updated:
              Imported: