15bd8deadSopenharmony_ci 25bd8deadSopenharmony_ciName 35bd8deadSopenharmony_ci SUNX_constant_data 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_SUNX_constant_data 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Ron Bielaski, Sun (Ron.Bielaski 'at' eng.sun.com) 125bd8deadSopenharmony_ci Jack Middleton, Sun (Jack.Middleton 'at' eng.sun.com) 135bd8deadSopenharmony_ci 145bd8deadSopenharmony_ciStatus 155bd8deadSopenharmony_ci 165bd8deadSopenharmony_ci Shipping 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciVersion 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci $Date: 1999/12/28 01:40:37 $ $Revision: 1.5 $ 215bd8deadSopenharmony_ci SUN Date: 99/06/25 15:06:46 Revision: 1.2 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciNumber 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci 163 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ciDependencies 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ci None 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ciOverview 325bd8deadSopenharmony_ci 335bd8deadSopenharmony_ci This extension allows the pixel data specified by the 345bd8deadSopenharmony_ci application to be used internally without making a second copy. 355bd8deadSopenharmony_ci This extension affects how the pixel data in client memory is 365bd8deadSopenharmony_ci interpreted and therefore affects DrawPixels, Bitmap, 375bd8deadSopenharmony_ci PolygonStipple, TexImage1D, TexImage2D, TexImage3DEXT, 385bd8deadSopenharmony_ci ColorTableSGI. 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciNew Procedures and Functions 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci void FinishTextureSUNX(void) 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ciNew Tokens 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci Accepted by the <pname> parameter PixelStore*() 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci UNPACK_CONSTANT_DATA_SUNX 0x81D5 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci Accepted by <pname> parameter of GetTexLevelParameter() 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ci TEXTURE_CONSTANT_DATA_SUNX 0x81D6 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ciAdditions to Chapter 2 of the GL Specification (OpenGL Operation) 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ciWhen TexImage1D(), TexImage2D(), TexImage3DEXT() is called, 585bd8deadSopenharmony_cispecifying PixelStore*() with pname UNPACK_CONSTANT_DATA_SUNX set to 595bd8deadSopenharmony_ciTRUE will allow the implementation to use the application provided data 605bd8deadSopenharmony_cipointer internally thereby avoiding a second copy. If pixel transfer is 615bd8deadSopenharmony_cienabled when using this pixel store mode or if the constant directive 625bd8deadSopenharmony_cicannot be honored , then the constant directive will be ignored and a 635bd8deadSopenharmony_cicopy will be made internally. Thus, specifying "constant" data 645bd8deadSopenharmony_cidirective does not prohibit the implementation from making a copy, 655bd8deadSopenharmony_cirather it is treated as a hint by the implementation to avoid making a 665bd8deadSopenharmony_cisecond copy if possible. Note that if UNPACK_CONSTANT_DATA_SUNX is set 675bd8deadSopenharmony_cito TRUE, and all the pixel store values are not default values then the 685bd8deadSopenharmony_ciconstant hint will not be honored. 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ciA TexSubImage*() will always make a copy of the existing texture 725bd8deadSopenharmony_ciimage before updating the subimage except when the scenario given below 735bd8deadSopenharmony_ciis true. 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ciIf a TexSubImage1D(), TexSubImage2D(), TexSubImage3DEXT() is 765bd8deadSopenharmony_cicalled with PixelStore pname UNPACK_CONSTANT_DATA_SUNX set to TRUE on a 775bd8deadSopenharmony_ciconstant texture, then the address of the start of the texture image is 785bd8deadSopenharmony_cicomputed using the specified xoffset, yoffset, zoffset. If this 795bd8deadSopenharmony_cicomputed address matches the start address of the currently used 805bd8deadSopenharmony_ciconstant texture then no action is taken. If the addresses do not match 815bd8deadSopenharmony_cithen a copy is first made of the entire texture and then the subimage 825bd8deadSopenharmony_ciis updated in this copy. A texture is a "constant texture" if at the 835bd8deadSopenharmony_citime of the specification of the texture no copy was made. This 845bd8deadSopenharmony_ciattribute can be queried as described later. 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ciBefore an application changes a part or all of the texture image that 875bd8deadSopenharmony_cihas been specified as a constant texture image, it is necessary to 885bd8deadSopenharmony_cicall FinishTextureSUNX() to ensure that the library has completed all 895bd8deadSopenharmony_ciits processing with the currently specified constant texture image 905bd8deadSopenharmony_cibefore the changes are applied to this constant texture image by the 915bd8deadSopenharmony_ciapplication. 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ciIf a CopyTexImage[1/2/3]D or CopyTexSubImage[1/2/3]D is made and 945bd8deadSopenharmony_cithe existing texture image is constant, then a copy is made 955bd8deadSopenharmony_ciinternally before executing the CopyTex* calls. 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ciIn immediate mode, for DrawPixels()/Bitmap(), specifying constant data 995bd8deadSopenharmony_ciis not meaningful since data does not have a life beyond the call 1005bd8deadSopenharmony_ciitself. 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ciA texture image/raster image or bitmap could be specified as constant 1035bd8deadSopenharmony_ciat the time of the creation of the display list. If pixelmap/pixel 1045bd8deadSopenharmony_citransfer is enabled before calling the display list, then a copy is 1055bd8deadSopenharmony_cimade internally and the data is no longer constant. 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ciIt is invalid to specify a texture subimage as constant in a display 1085bd8deadSopenharmony_cilist. Doing so, will result in an INVALID_OPERATION error. 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ciQuery support 1115bd8deadSopenharmony_ci------------- 1125bd8deadSopenharmony_ciThe pixel store value for the constant data that has been set can be 1135bd8deadSopenharmony_ciinquired using Get() with pname set to UNPACK_CONSTANT_DATA_SUNX. 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ciWhen TexImage*D() is executed with target PROXY_TEXTURE_[1,2,3]D then 1165bd8deadSopenharmony_cithe state value of TEXTURE_CONSTANT_DATA_SUNX will be set to 0 if 1175bd8deadSopenharmony_cithe texture data cannot be stored as constant, otherwise the value 1185bd8deadSopenharmony_ciwill be 1. 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ciThe constant nature of the texture data can be inquired using 1215bd8deadSopenharmony_ciGetTexLevelParameter*() with pname TEXTURE_CONSTANT_DATA_SUNX and 1225bd8deadSopenharmony_citarget PROXY_TEXTURE_[1,2,3]D . If the target is TEXTURE_[1,2,3]D and 1235bd8deadSopenharmony_cipname is TEXTURE_CONSTANT_DATA_SUNX, then the value returned is TRUE 1245bd8deadSopenharmony_ciif the the texture image defined at this level is currently 1255bd8deadSopenharmony_ciconstant. 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ciNote that a texture image may become non-constant (that is an internal 1285bd8deadSopenharmony_cicopy may be made) at the time when the texture is used rather than at a 1295bd8deadSopenharmony_citime when the texture is specified. If interested, an application could 1305bd8deadSopenharmony_ciinquire the constant nature of the texture data after the texture has 1315bd8deadSopenharmony_cibeen used for rendering. 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ciAdditions to the GLX / WGL / AGL Specifications 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci None 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ciGLX Protocol 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci None 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ciErrors 1425bd8deadSopenharmony_ci 1435bd8deadSopenharmony_ci None 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ciNew State 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci ??? 1485bd8deadSopenharmony_ci (will affect both pixel pack/unpack and texture state) 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ciNew Implementation Dependent State 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ci None 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ciRevision History 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ci 6/24/99 - Updated name string to SUNX instead of SUN. 1575bd8deadSopenharmony_ci Added fields from the new extension template. 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ci 160