15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci WGL_I3D_gamma 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci WGL_I3D_gamma 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Dale Kirkland, Intense3D (kirkland 'at' intense3d.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciStatus 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Complete 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciVersion 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci Date: 04/17/2000 Revision 1.0 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciNumber 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci 251 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ciDependencies 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ci The extension is written against the OpenGL 1.2.1 Specification 285bd8deadSopenharmony_ci although it should work on any previous OpenGL specification. 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci The WGL_EXT_extensions_string extension is required. 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciOverview 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci The gamma extension provides an interface to read and load the 355bd8deadSopenharmony_ci gamma table. Other options such as having gamma only affect 365bd8deadSopenharmony_ci OpenGL windows can also be set. 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ciIP Status 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci None 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ciIssues 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci None 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ciNew Procedures and Functions 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci BOOL wglGetGammaTableParametersI3D(HDC hDC, 495bd8deadSopenharmony_ci int iAttribute, 505bd8deadSopenharmony_ci int *piValue) 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ci BOOL wglSetGammaTableParametersI3D(HDC hDC, 535bd8deadSopenharmony_ci int iAttribute, 545bd8deadSopenharmony_ci const int *piValue) 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ci BOOL wglGetGammaTableI3D(HDC hDC, 575bd8deadSopenharmony_ci int iEntries, 585bd8deadSopenharmony_ci USHORT *puRed, 595bd8deadSopenharmony_ci USHORT *puGreen, 605bd8deadSopenharmony_ci USHORT *puBlue) 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ci BOOL wglSetGammaTableI3D(HDC hDC, 635bd8deadSopenharmony_ci int iEntries, 645bd8deadSopenharmony_ci const USHORT *puRed, 655bd8deadSopenharmony_ci const USHORT *puGreen, 665bd8deadSopenharmony_ci const USHORT *puBlue) 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ciNew Tokens 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci Accepted by the <iAttribute> parameter of wglGetGammaTableParametersI3D: 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci WGL_GAMMA_TABLE_SIZE_I3D 0x204E 735bd8deadSopenharmony_ci WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ci Accepted by the <iAttribute> parameter of wglSetGammaTableParametersI3D: 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation) 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci None 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization) 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci None 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment 885bd8deadSopenharmony_ciOperations and the Frame Buffer) 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci None 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions) 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci None 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 1.2.1 Specification (State and 975bd8deadSopenharmony_ciState Requests) 985bd8deadSopenharmony_ci 995bd8deadSopenharmony_ci None 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL 1.2.1 Specification (Invariance) 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci None 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ciAdditions to the WGL Specification 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci Gamma correction for each monitor that supports a gamma table is 1085bd8deadSopenharmony_ci controlled by loading the gamma table and setting the appropriate 1095bd8deadSopenharmony_ci parameters. The function wglSetGammaTableI3D loads the gamma 1105bd8deadSopenharmony_ci table: 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ci BOOL wglSetGammaTableI3D(HDC hDC, 1135bd8deadSopenharmony_ci int iEntries, 1145bd8deadSopenharmony_ci const USHORT *puRed, 1155bd8deadSopenharmony_ci const USHORT *puGreen, 1165bd8deadSopenharmony_ci const USHORT *puBlue) 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci <hDC> is a device context for the graphics adapter or a window 1195bd8deadSopenharmony_ci residing on a monitor whose graphics adapter supports the gamma 1205bd8deadSopenharmony_ci extension. For multiple monitor systems, only the gamma table 1215bd8deadSopenharmony_ci associated with <hDC> is loaded. 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ci The red, green, and blue data for the gamma table are pointed to by 1245bd8deadSopenharmony_ci <puRed>, <puGreen> and <puBlue> respectively. Each color array 1255bd8deadSopenharmony_ci must contain <iEntries> entries. Gamma entries specified outside 1265bd8deadSopenharmony_ci the hardware gamma table are ignored. 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci The red, green, and blue data is defined using 16-bit precision. 1295bd8deadSopenharmony_ci If the hardware gamma table has less than 16 bits of precision, the 1305bd8deadSopenharmony_ci data is shifted down so that only the most-significant bits are 1315bd8deadSopenharmony_ci used without rounding. 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci The current gamma table can be obtained by calling the function 1345bd8deadSopenharmony_ci wglGetGammaTableI3D: 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci BOOL wglGetGammaTableI3D(HDC hDC, 1375bd8deadSopenharmony_ci int iEntries, 1385bd8deadSopenharmony_ci USHORT *puRed, 1395bd8deadSopenharmony_ci USHORT *puGreen, 1405bd8deadSopenharmony_ci USHORT *puBlue) 1415bd8deadSopenharmony_ci 1425bd8deadSopenharmony_ci <hDC> is a device context for the graphics adapter or a window 1435bd8deadSopenharmony_ci residing on a monitor whose graphics adapter supports the gamma 1445bd8deadSopenharmony_ci extension. For multiple monitor systems, only the gamma table 1455bd8deadSopenharmony_ci associated with <hDC> is read. 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci <puRed>, <puGreen> and <puBlue> each point to an unsigned-short 1485bd8deadSopenharmony_ci array containing <iEntries>. If <iEntries> is larger than the 1495bd8deadSopenharmony_ci hardware gamma table, only the number of entries that correspond to 1505bd8deadSopenharmony_ci the size of the hardware gamma table will be returned. 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ci The red, green and blue data is defined using 16-bit precision 1535bd8deadSopenharmony_ci according to the description above. If the hardware gamma table 1545bd8deadSopenharmony_ci has less than 16 bits of precision, the data is shifted up. 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ci Gamma table parameters can be set with the function 1575bd8deadSopenharmony_ci wglSetGammaTableParametersI3D: 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ci BOOL wglSetGammaTableParametersI3D(HDC hDC, 1605bd8deadSopenharmony_ci int iAttribute, 1615bd8deadSopenharmony_ci const int *piValue) 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ci <hDC> is a device context for the graphics adapter or a window 1645bd8deadSopenharmony_ci residing on a monitor whose graphics adapter supports the gamma 1655bd8deadSopenharmony_ci extension. For multiple monitor systems, only the gamma table 1665bd8deadSopenharmony_ci associated with <hDC> is set. 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ci <iAttribute> must be one of the following values: 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ci WGL_GAMMA_EXCLUDE_DESKTOP_I3D 1715bd8deadSopenharmony_ci If the value pointed to by <piValue> is non-zero, only the 1725bd8deadSopenharmony_ci contents of OpenGL windows are gamma corrected; the 1735bd8deadSopenharmony_ci desktop will not be gamma corrected. If the value pointed 1745bd8deadSopenharmony_ci to by <piValue> is zero, all windows and the desktop are 1755bd8deadSopenharmony_ci gamma corrected. This value defaults to zero. 1765bd8deadSopenharmony_ci 1775bd8deadSopenharmony_ci Gamma table parameters can be queried with the function 1785bd8deadSopenharmony_ci wglGetGammaTableParametersI3D: 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ci BOOL wglGetGammaTableParametersI3D(HDC hDC, 1815bd8deadSopenharmony_ci int iAttribute, 1825bd8deadSopenharmony_ci int *piValue) 1835bd8deadSopenharmony_ci 1845bd8deadSopenharmony_ci <hDC> is a device context for the graphics adapter or a window 1855bd8deadSopenharmony_ci residing on a monitor whose graphics adapter supports the gamma 1865bd8deadSopenharmony_ci extension. For multiple monitor systems, only the gamma table 1875bd8deadSopenharmony_ci parameters associated with <hDC> are returned. 1885bd8deadSopenharmony_ci 1895bd8deadSopenharmony_ci <iAttribute> must be one of the following values: 1905bd8deadSopenharmony_ci 1915bd8deadSopenharmony_ci WGL_GAMMA_EXCLUDE_DESKTOP_I3D 1925bd8deadSopenharmony_ci Returns the current setting for desktop gamma correction. 1935bd8deadSopenharmony_ci If the value returned in the location pointed to by 1945bd8deadSopenharmony_ci <piValue> is non-zero, only the contents of OpenGL windows 1955bd8deadSopenharmony_ci are gamma corrected; the desktop will not be gamma 1965bd8deadSopenharmony_ci corrected. 1975bd8deadSopenharmony_ci 1985bd8deadSopenharmony_ci WGL_GAMMA_TABLE_SIZE_I3D 1995bd8deadSopenharmony_ci Returns the number of entries in the hardware gamma table. 2005bd8deadSopenharmony_ci 2015bd8deadSopenharmony_ciDependencies on WGL_EXT_extensions_string 2025bd8deadSopenharmony_ci 2035bd8deadSopenharmony_ci Because there is no way to extend wgl, these calls are defined in 2045bd8deadSopenharmony_ci the ICD and can be called by obtaining the address with 2055bd8deadSopenharmony_ci wglGetProcAddress. Because this extension is a WGL extension, it 2065bd8deadSopenharmony_ci is not included in the GL_EXTENSIONS string. Its existence can be 2075bd8deadSopenharmony_ci determined with the WGL_EXT_extensions_string extension. 2085bd8deadSopenharmony_ci 2095bd8deadSopenharmony_ciErrors 2105bd8deadSopenharmony_ci 2115bd8deadSopenharmony_ci If the function succeeds, a value of TRUE is returned. If the 2125bd8deadSopenharmony_ci function fails, a value of FALSE is returned. To get extended 2135bd8deadSopenharmony_ci error information, call GetLastError. 2145bd8deadSopenharmony_ci 2155bd8deadSopenharmony_ci ERROR_DC_NOT_FOUND The <hDC> was not valid. 2165bd8deadSopenharmony_ci 2175bd8deadSopenharmony_ci ERROR_NO_SYSTEM_RESOURCES There is no support for a gamma table 2185bd8deadSopenharmony_ci for the adapter specified by <hDC>. 2195bd8deadSopenharmony_ci 2205bd8deadSopenharmony_ci ERROR_INVALID_DATA <iAttribute> is not a valid value. 2215bd8deadSopenharmony_ci 2225bd8deadSopenharmony_ci ERROR_INVALID_DATA <iEntries> is not a positive value. 2235bd8deadSopenharmony_ci 2245bd8deadSopenharmony_ciNew State 2255bd8deadSopenharmony_ci 2265bd8deadSopenharmony_ci None 2275bd8deadSopenharmony_ci 2285bd8deadSopenharmony_ciNew Implementation Dependent State 2295bd8deadSopenharmony_ci 2305bd8deadSopenharmony_ci None 2315bd8deadSopenharmony_ci 2325bd8deadSopenharmony_ciRevision History 2335bd8deadSopenharmony_ci 2345bd8deadSopenharmony_ci 11/24/1999 0.1 First draft. 2355bd8deadSopenharmony_ci 11/29/1999 0.2 Changed wglGetGammaTableI3D and 2365bd8deadSopenharmony_ci wglSetGammaTableI3D to accept three pointers, one 2375bd8deadSopenharmony_ci each for the red, green, and blue data for the 2385bd8deadSopenharmony_ci gamma table. 2395bd8deadSopenharmony_ci 04/17/2000 1.0 Fixed a few typos. 2405bd8deadSopenharmony_ci Driver released to ISVs. 241