Changeset 64763 in vbox for trunk/src/VBox/GuestHost/OpenGL
- Timestamp:
- Nov 29, 2016 5:59:55 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 112107
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/util/pixel.c
r63199 r64763 382 382 } 383 383 } 384 else if (srcFormat == GL_LUMINANCE 384 else if (srcFormat == GL_LUMINANCE 385 385 #ifdef CR_EXT_texture_sRGB 386 386 || srcFormat == GL_SLUMINANCE_EXT … … 983 983 #endif 984 984 ) { 985 int i ndex;985 int idx; 986 986 if (dstFormat == GL_RED) 987 i ndex = 0;988 else if (dstFormat == GL_LUMINANCE 987 idx = 0; 988 else if (dstFormat == GL_LUMINANCE 989 989 #ifdef CR_EXT_texture_sRGB 990 990 || dstFormat == GL_SLUMINANCE_EXT … … 992 992 #endif 993 993 ) 994 i ndex = 0;994 idx = 0; 995 995 else if (dstFormat == GL_INTENSITY) 996 i ndex = 0;996 idx = 0; 997 997 else if (dstFormat == GL_GREEN) 998 i ndex = 1;998 idx = 1; 999 999 else if (dstFormat == GL_BLUE) 1000 i ndex = 2;1000 idx = 2; 1001 1001 else 1002 i ndex = 3;1002 idx = 3; 1003 1003 switch (dstType) { 1004 1004 case GL_BYTE: 1005 1005 for (i = 0; i < width; i++) 1006 bDst[i] = FLOAT_TO_BYTE(tmpRow[i*4+i ndex]);1006 bDst[i] = FLOAT_TO_BYTE(tmpRow[i*4+idx]); 1007 1007 break; 1008 1008 case GL_UNSIGNED_BYTE: 1009 1009 for (i = 0; i < width; i++) 1010 ubDst[i] = FLOAT_TO_UBYTE(tmpRow[i*4+i ndex]);1010 ubDst[i] = FLOAT_TO_UBYTE(tmpRow[i*4+idx]); 1011 1011 break; 1012 1012 case GL_SHORT: 1013 1013 for (i = 0; i < width; i++) 1014 sDst[i] = FLOAT_TO_SHORT(tmpRow[i*4+i ndex]);1014 sDst[i] = FLOAT_TO_SHORT(tmpRow[i*4+idx]); 1015 1015 break; 1016 1016 case GL_UNSIGNED_SHORT: 1017 1017 for (i = 0; i < width; i++) 1018 usDst[i] = FLOAT_TO_USHORT(tmpRow[i*4+i ndex]);1018 usDst[i] = FLOAT_TO_USHORT(tmpRow[i*4+idx]); 1019 1019 break; 1020 1020 case GL_INT: 1021 1021 for (i = 0; i < width; i++) 1022 iDst[i] = FLOAT_TO_INT(tmpRow[i*4+i ndex]);1022 iDst[i] = FLOAT_TO_INT(tmpRow[i*4+idx]); 1023 1023 break; 1024 1024 case GL_UNSIGNED_INT: 1025 1025 for (i = 0; i < width; i++) 1026 uiDst[i] = FLOAT_TO_UINT(tmpRow[i*4+i ndex]);1026 uiDst[i] = FLOAT_TO_UINT(tmpRow[i*4+idx]); 1027 1027 break; 1028 1028 case GL_FLOAT: 1029 1029 for (i = 0; i < width; i++) 1030 fDst[i] = tmpRow[i*4+i ndex];1030 fDst[i] = tmpRow[i*4+idx]; 1031 1031 break; 1032 1032 case GL_DOUBLE: 1033 1033 for (i = 0; i < width; i++) 1034 dDst[i] = tmpRow[i*4+i ndex];1034 dDst[i] = tmpRow[i*4+idx]; 1035 1035 break; 1036 1036 default: … … 1589 1589 { 1590 1590 CRASSERT(srcBytesPerRow == dstBytesPerRow); 1591 1592 if (srcBytesPerRow==srcRowStrideBytes 1591 1592 if (srcBytesPerRow==srcRowStrideBytes 1593 1593 && srcRowStrideBytes==dstRowStrideBytes) 1594 1594 { … … 1806 1806 char depth; 1807 1807 char imagedesc; 1808 1808 1809 1809 } tgaheader_t; 1810 1810 #pragma pack()
Note:
See TracChangeset
for help on using the changeset viewer.