InitialObjectDescriptor {
  objectDescriptorID 1
  ODProfileLevelIndication 0xFF
  sceneProfileLevelIndication 0xFE
  audioProfileLevelIndication 0xFF
  visualProfileLevelIndication 0xFF
  graphicsProfileLevelIndication 0xFE

  esdescr [
    ES_Descriptor {
      es_id 1
      decConfigDescr DecoderConfigDescriptor {
				streamType 3
				decSpecificInfo BIFSConfig {
				  isCommandStream true
				  pixelMetric true
				  pixelWidth 200
				  pixelHeight 200
				}
      }
    }
    ES_Descriptor {
      es_id 2
      decConfigDescr DecoderConfigDescriptor {
				streamType 1
      }
    }
  ]
}

Group { 
 children [

	Background2D { backColor 1 1 1}

  WorldInfo {
   title "Composite Texture test"
   info ["This shows a box" "with a 3D composite texture" "the texture is a spinning sphere with an image texture"  "" "GPAC Regression Tests" "$Date: 2007-07-27 09:46:08 $ - $Revision: 1.2 $" "(C) 2002-2004 GPAC Team"]
  }
			

	DEF TR Transform {
  	translation 0 0 0
  	children [
     Shape {
     	appearance Appearance {
     		texture CompositeTexture3D {
     	   pixelWidth 128
      	 pixelHeight 128
     			children [
     				#MPEG-4 is stupid here, background2D can't be encoded in the CT3D.background field
      	 		Background2D {url "../auxiliary_files/sky.jpg" backColor 1 0 0}
						DEF TR2 Transform {
							scale 1 0.5 1
							children [
						   Shape {
						   	appearance Appearance {
						   		 material DEF MAT2 Material { diffuseColor 0 0 1 }
						   		 texture ImageTexture { url "10"}
						   	 }
								geometry Sphere {radius 60}
							}
						 ]
						}
     		  ]
     	   }
      }
      geometry Box {size 64 64 64 }
     }
    ]
  }

  DEF TS TimeSensor { cycleInterval 2.0 loop TRUE }
  DEF SI ScalarInterpolator {
  	key [0 0.5 1]
  	keyValue [0 0.8 0]
  }
  DEF OI OrientationInterpolator  {
  	key [0 0.5 1]
  	keyValue [1 1 1 0, 1 1 1 3.14, 1 1 1 6.26]
 	}
 ]
}

ROUTE TS.fraction_changed TO OI.set_fraction
ROUTE OI.value_changed TO TR.rotation
ROUTE OI.value_changed TO TR2.rotation
ROUTE TS.fraction_changed TO SI.set_fraction
ROUTE SI.value_changed TO MAT2.transparency

AT 0 {
	UPDATE OD [
		ObjectDescriptor {
		  objectDescriptorID  10
		  esDescr [
		    ES_Descriptor {
		      ES_ID 20
		      muxInfo MuxInfo {
		       fileName "../auxiliary_files/logo.jpg"
		      }
		    }
		  ]
		}
	]
}

