Changeset 3301 for OpenSceneGraph/trunk/src/osg/dxtctool.cpp
- Timestamp:
- 08/18/04 08:06:02 (9 years ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osg/dxtctool.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osg/dxtctool.cpp
r3300 r3301 79 79 { 80 80 // const size_t Size = ((m_Width + 3) / 4) * ((m_Height + 3) / 4) * BSIZE_DXT1; 81 __int8 * const pPixels = (__int8 * const) m_pPixels;81 dxtc_int8 * const pPixels = (dxtc_int8 * const) m_pPixels; 82 82 83 83 if (m_Height == 2) … … 102 102 { 103 103 // const size_t Size = ((m_Width + 3) / 4) * ((m_Height + 3) / 4) * BSIZE_DXT3; 104 // __int8 * const pPixels = (__int8 * const) m_pPixels;104 // dxtc_int8 * const pPixels = (dxtc_int8 * const) m_pPixels; 105 105 106 106 if (m_Height == 2) 107 107 for (size_t j = 0; j < (m_Width + 3) / 4; ++j) { 108 BVF_Alpha_DXT3_H2((( __int8 * const) m_pPixels) + (j * BSIZE_DXT3));109 BVF_Color_H2((( __int8 * const) m_pPixels) + (j * BSIZE_DXT3 + BSIZE_ALPHA_DXT3));108 BVF_Alpha_DXT3_H2(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT3)); 109 BVF_Color_H2(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT3 + BSIZE_ALPHA_DXT3)); 110 110 } 111 111 112 112 if (m_Height == 4) 113 113 for (size_t j = 0; j < (m_Width + 3) / 4; ++j) { 114 BVF_Alpha_DXT3_H4((( __int8 * const) m_pPixels) + (j * BSIZE_DXT3));115 BVF_Color_H4((( __int8 * const) m_pPixels) + (j * BSIZE_DXT3 + BSIZE_ALPHA_DXT3));114 BVF_Alpha_DXT3_H4(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT3)); 115 BVF_Color_H4(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT3 + BSIZE_ALPHA_DXT3)); 116 116 } 117 117 … … 121 121 const size_t TargetRow = ((m_Height + 3) / 4) - (i + 1); 122 122 BVF_Alpha_DXT3(GetBlock(i, j, BSIZE_DXT3), GetBlock(TargetRow, j, BSIZE_DXT3)); 123 BVF_Color((( __int8 * const) GetBlock(i, j, BSIZE_DXT3)) + BSIZE_ALPHA_DXT3,124 (( __int8 * const) GetBlock(TargetRow, j, BSIZE_DXT3)) + BSIZE_ALPHA_DXT3);123 BVF_Color(((dxtc_int8 * const) GetBlock(i, j, BSIZE_DXT3)) + BSIZE_ALPHA_DXT3, 124 ((dxtc_int8 * const) GetBlock(TargetRow, j, BSIZE_DXT3)) + BSIZE_ALPHA_DXT3); 125 125 } 126 126 } … … 131 131 { 132 132 // const size_t Size = ((m_Width + 3) / 4) * ((m_Height + 3) / 4) * BSIZE_DXT5; 133 // __int8 * const pPixels = (__int8 * const) m_pPixels;133 // dxtc_int8 * const pPixels = (dxtc_int8 * const) m_pPixels; 134 134 135 135 if (m_Height == 2) 136 136 for (size_t j = 0; j < (m_Width + 3) / 4; ++j) { 137 BVF_Alpha_DXT5_H2((( __int8 * const) m_pPixels) + (j * BSIZE_DXT5));138 BVF_Color_H2((( __int8 * const) m_pPixels) + (j * BSIZE_DXT5 + BSIZE_ALPHA_DXT5));137 BVF_Alpha_DXT5_H2(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT5)); 138 BVF_Color_H2(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT5 + BSIZE_ALPHA_DXT5)); 139 139 } 140 140 141 141 if (m_Height == 4) 142 142 for (size_t j = 0; j < (m_Width + 3) / 4; ++j) { 143 BVF_Alpha_DXT5_H4((( __int8 * const) m_pPixels) + (j * BSIZE_DXT5));144 BVF_Color_H4((( __int8 * const) m_pPixels) + (j * BSIZE_DXT5 + BSIZE_ALPHA_DXT5));143 BVF_Alpha_DXT5_H4(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT5)); 144 BVF_Color_H4(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT5 + BSIZE_ALPHA_DXT5)); 145 145 } 146 146 … … 150 150 const size_t TargetRow = ((m_Height + 3) / 4) - (i + 1); 151 151 BVF_Alpha_DXT5(GetBlock(i, j, BSIZE_DXT5), GetBlock(TargetRow, j, BSIZE_DXT5)); 152 BVF_Color((( __int8 * const) GetBlock(i, j, BSIZE_DXT5)) + BSIZE_ALPHA_DXT5,153 (( __int8 * const) GetBlock(TargetRow, j, BSIZE_DXT5)) + BSIZE_ALPHA_DXT5);152 BVF_Color(((dxtc_int8 * const) GetBlock(i, j, BSIZE_DXT5)) + BSIZE_ALPHA_DXT5, 153 ((dxtc_int8 * const) GetBlock(TargetRow, j, BSIZE_DXT5)) + BSIZE_ALPHA_DXT5); 154 154 } 155 155 }
