InitialObjectDescriptor { objectDescriptorID 1 audioProfileLevelIndication 255 visualProfileLevelIndication 255 sceneProfileLevelIndication 254 graphicsProfileLevelIndication 254 ODProfileLevelIndication 255 esDescr [ ES_Descriptor { ES_ID 1 decConfigDescr DecoderConfigDescriptor { streamType 3 decSpecificInfo BIFSConfig { isCommandStream true pixelMetric true pixelWidth 300 pixelHeight 300 } } } ] } OrderedGroup { children [ DEF B Background2D { backColor 1 0 0 } WorldInfo { info [ "This test shows the usage of the PixelTexture node." "The PixelTexture allows to define a non-vectorial synthetic texture. The texture is defined by giving its size, the color depth in byte, and the color components (ARGB) for each pixel in the texture" "In this scene, 4 circles are filled with a 4x4-pixels texture whose color depth are respectively 1 byte, 2 bytes, 3 and 4 bytes." "1 byte corresponds to 8-bits grey scale" "2 bytes corresponds to 8-bits grey scale + 8-bits transparency" "3 bytes corresponds to 24-bits RGB" "4 bytes corresponds to 32-bits ARGB" "The background color of the scene is animated to see the effect on the texture." "" "GPAC Regression Tests" "(C) 2002-2006 GPAC Team" ] title "Synthetic Non Vectorial Texture" } Transform2D { translation -80 90 children [ Shape { appearance Appearance { texture PixelTexture { image 4 4 1 0xFF 0xFF 0x00 0x00 0xFF 0xFF 0x00 0x00 0x00 0x00 0xFF 0xFF 0x00 0x00 0xFF 0xFF } } geometry Circle { radius 50 } } Transform2D { translation 0 -70 children [ Shape { appearance DEF TA Appearance { material Material2D { emissiveColor 1 1 1 filled TRUE } } geometry Text { string [ "Color Depth:" "1 Byte" ] fontStyle DEF FS FontStyle { size 20 justify [ "MIDDLE" "MIDDLE" ] family "SANS" } } } ] } ] } Transform2D { translation 80 90 children [ Shape { appearance Appearance { texture PixelTexture { image 4 4 2 0x00FF 0x00FF 0x0000 0x0000 0x00FF 0x00FF 0x0000 0x0000 0x0000 0x0000 0x00FF 0x00FF 0x0000 0x0000 0x00FF 0x00FF } } geometry Circle { radius 50 } } Transform2D { translation 0 -70 children [ Shape { appearance USE TA geometry Text { string [ "Color Depth:" "2 Bytes" ] fontStyle USE FS } } ] } ] } Transform2D { translation -80 -60 children [ Shape { appearance Appearance { texture PixelTexture { image 4 4 3 0xFFFFFF 0xFFFFFF 0x00FF00 0x00FF00 0xFFFFFF 0xFFFFFF 0x00FF00 0x00FF00 0xFF00FF 0xFF00FF 0x000000 0x000000 0xFF00FF 0xFF00FF 0x000000 0x000000 } } geometry Circle { radius 50 } } Transform2D { translation 0 -70 children [ Shape { appearance USE TA geometry Text { string [ "Color Depth:" "3 Bytes" ] fontStyle USE FS } } ] } ] } Transform2D { translation 80 -60 children [ Shape { appearance Appearance { texture PixelTexture { image 4 4 4 0xFFFFFF00 0xFFFFFF00 0x00FF00FF 0x00FF00FF 0xFFFFFF00 0xFFFFFF00 0x00FF00FF 0x00FF00FF 0xFF00FFFF 0xFF00FFFF 0x00000000 0x00000000 0xFF00FFFF 0xFF00FFFF 0x00000000 0x00000000 } } geometry Circle { radius 50 } } Transform2D { translation 0 -70 children [ Shape { appearance USE TA geometry Text { string [ "Color Depth:" "4 Bytes" ] fontStyle USE FS } } ] } ] } DEF TS TimeSensor { cycleInterval 2 loop TRUE } DEF CI ColorInterpolator { key [0 0.5 1] keyValue [1 0 0 0 0 1 1 0 0] } ] } ROUTE TS.fraction_changed TO CI.set_fraction ROUTE CI.value_changed TO B.backColor