< prev index next >

src/java.desktop/windows/native/libawt/java2d/d3d/D3DVertexCacher.cpp

Print this page




  92                              U11, V11, U12, V12, U13, V13, \
  93                              U21, V21, U22, V22, U23, V23, \
  94                              VCOLOR)                       \
  95 do { \
  96     ADD_VERTEX_XYUVUVC(X1, Y1, U11, V11, U21, V21, VCOLOR); \
  97     ADD_VERTEX_XYUVUVC(X2, Y2, U12, V12, U22, V22, VCOLOR); \
  98     ADD_VERTEX_XYUVUVC(X3, Y3, U13, V13, U23, V23, VCOLOR); \
  99     batches[currentBatch].pNum++;   \
 100 } while (0)
 101 
 102 // These are fudge factors for rendering lines found by experimenting.
 103 // They are used to tweak the geometry such that the rendering (mostly) matches
 104 // our software rendering on most hardware. The main goal was to pick the
 105 // numbers such that the beginning and ending pixels of lines match.
 106 #define LINE_FUDGE
 107 // fudge factors
 108 #ifdef LINE_FUDGE
 109 
 110 // Horiz/vertical
 111 #define HV_FF1 ( 0.0f)
 112 #define HV_FF2 ( 0.51f)
 113 // For the record: value below (or larger) is required for Intel 855, but
 114 // breaks Nvidia, ATI and Intel 965, and since the pipeline is disabled on
 115 // 855 anyway we'll use 0.51f.
 116 //#define HV_FF2 ( 0.5315f)
 117 #define HV_FF3 (-0.2f)
 118 // single pixel
 119 #define SP_FF4 ( 0.3f)
 120 
 121 // diagonal, down
 122 #define DD_FX1 (-0.1f)
 123 #define DD_FY1 (-0.25f)
 124 #define DD_FX2 ( 0.2f)
 125 #define DD_FY2 ( 0.304f)
 126 // For the record: with this value diagonal-down lines with Texture paint
 127 // are a bit off on all chipsets but Intel 965. So instead we'll use
 128 // .304f which makes it better for the rest, but at a price of a bit
 129 // of pixel/texel shifting on 965G
 130 //#define DD_FY2 ( 0.4f)
 131 // diagonal, up
 132 #define DU_FX1 (-0.1f)




  92                              U11, V11, U12, V12, U13, V13, \
  93                              U21, V21, U22, V22, U23, V23, \
  94                              VCOLOR)                       \
  95 do { \
  96     ADD_VERTEX_XYUVUVC(X1, Y1, U11, V11, U21, V21, VCOLOR); \
  97     ADD_VERTEX_XYUVUVC(X2, Y2, U12, V12, U22, V22, VCOLOR); \
  98     ADD_VERTEX_XYUVUVC(X3, Y3, U13, V13, U23, V23, VCOLOR); \
  99     batches[currentBatch].pNum++;   \
 100 } while (0)
 101 
 102 // These are fudge factors for rendering lines found by experimenting.
 103 // They are used to tweak the geometry such that the rendering (mostly) matches
 104 // our software rendering on most hardware. The main goal was to pick the
 105 // numbers such that the beginning and ending pixels of lines match.
 106 #define LINE_FUDGE
 107 // fudge factors
 108 #ifdef LINE_FUDGE
 109 
 110 // Horiz/vertical
 111 #define HV_FF1 ( 0.0f)
 112 #define HV_FF2 ( 0.501f)
 113 // For the record: value below (or larger) is required for Intel 855, but
 114 // breaks Nvidia, ATI and Intel 965, and since the pipeline is disabled on
 115 // 855 anyway we'll use 0.51f.
 116 //#define HV_FF2 ( 0.5315f)
 117 #define HV_FF3 (-0.2f)
 118 // single pixel
 119 #define SP_FF4 ( 0.3f)
 120 
 121 // diagonal, down
 122 #define DD_FX1 (-0.1f)
 123 #define DD_FY1 (-0.25f)
 124 #define DD_FX2 ( 0.2f)
 125 #define DD_FY2 ( 0.304f)
 126 // For the record: with this value diagonal-down lines with Texture paint
 127 // are a bit off on all chipsets but Intel 965. So instead we'll use
 128 // .304f which makes it better for the rest, but at a price of a bit
 129 // of pixel/texel shifting on 965G
 130 //#define DD_FY2 ( 0.4f)
 131 // diagonal, up
 132 #define DU_FX1 (-0.1f)


< prev index next >