~ubuntu-branches/ubuntu/raring/gpac/raring

« back to all changes in this revision

Viewing changes to regression_tests/bifs-2D-texturing-compositetexture2D-background.bt

  • Committer: Bazaar Package Importer
  • Author(s): John Dong
  • Date: 2007-01-24 23:34:57 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070124233457-zzlls8afkt0nyakj
Tags: 0.4.2~rc2-0ubuntu1
* New upstream release
  * Most notably MP4 tagging support via MP4Box -itags
* debian/patches/01_64bits.dpatch: dropped; included upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
InitialObjectDescriptor {
 
2
 objectDescriptorID 1
 
3
 audioProfileLevelIndication 255
 
4
 visualProfileLevelIndication 255
 
5
 sceneProfileLevelIndication 254
 
6
 graphicsProfileLevelIndication 254
 
7
 ODProfileLevelIndication 255
 
8
 esDescr [
 
9
  ES_Descriptor {
 
10
   ES_ID 1
 
11
   decConfigDescr DecoderConfigDescriptor {
 
12
    streamType 3
 
13
    decSpecificInfo BIFSConfig {
 
14
     isCommandStream true
 
15
     pixelMetric true
 
16
     pixelWidth 600
 
17
     pixelHeight 400
 
18
    }
 
19
   }
 
20
  }
 
21
 ]
 
22
}
 
23
 
 
24
OrderedGroup {
 
25
 children [
 
26
  Background2D {
 
27
   backColor 1 1 1
 
28
  }
 
29
  WorldInfo {
 
30
   info [
 
31
    "This test shows the usage of the CompositeTexture node and how its background can be changed dynamically."
 
32
    "Here, the texture is a circle repeated on the X and Y directions. Just one circle object is used here, the result of the drawing is translated in each directions, the object is not duplicated." 
 
33
    "When the user moves the mouse over a circle, the background is changed. When the user clicks on a circle, the background is also changed." 
 
34
    "" 
 
35
    "GPAC Regression Tests" 
 
36
    "(C) 2002-2006 GPAC Team"
 
37
   ]
 
38
   title "CompositeTexture and Background2D nodes"
 
39
  }
 
40
  Shape {
 
41
   appearance Appearance {
 
42
    material DEF M1 Material2D {
 
43
     emissiveColor 0 1 0
 
44
    }
 
45
    texture CompositeTexture2D {
 
46
     pixelWidth 64
 
47
     pixelHeight 64
 
48
     children [
 
49
      DEF B1 Background2D { backColor 0 1 1 }
 
50
      DEF B2 Background2D { backColor 1 1 0 }
 
51
      DEF B3 Background2D { backColor 1 0 0 }
 
52
      DEF S Shape {
 
53
       appearance Appearance {
 
54
        material Material2D {
 
55
         emissiveColor 0 0 0
 
56
         filled TRUE
 
57
         transparency 0.5
 
58
        }
 
59
       }
 
60
       geometry Circle {
 
61
        radius 24
 
62
       }
 
63
      }
 
64
      DEF TS TouchSensor {}
 
65
     ]
 
66
    }
 
67
    textureTransform TextureTransform { scale 8 4 }
 
68
   }
 
69
   geometry Rectangle { size 300 150 }
 
70
  }
 
71
  
 
72
  Transform2D {
 
73
   translation 140 -110
 
74
   children [
 
75
    USE S
 
76
    Transform2D {
 
77
     translation 0 -50
 
78
     children [
 
79
      Shape {
 
80
       appearance DEF APP Appearance {
 
81
        material Material2D {
 
82
         emissiveColor 0 0 0
 
83
         filled TRUE
 
84
        }
 
85
       }
 
86
       geometry Text {
 
87
        string ["Composite Texture Pattern" "Black color with 0.5 transparency"]
 
88
        fontStyle DEF FS FontStyle {
 
89
         family ["SANS"]
 
90
         justify ["MIDDLE" "BEGIN"]
 
91
         size 20
 
92
        }
 
93
       }
 
94
      }
 
95
     ]
 
96
    }
 
97
   ]
 
98
  }
 
99
  Transform2D {
 
100
   translation -150 160
 
101
   children [
 
102
    Shape {
 
103
     appearance USE APP
 
104
     geometry Text {
 
105
      string ["Move mouse over texture" "to change texture background"]
 
106
      fontStyle USE FS
 
107
     }
 
108
    }
 
109
   ]
 
110
  }
 
111
 ]
 
112
}
 
113
 
 
114
ROUTE TS.isOver TO B2.set_bind
 
115
ROUTE TS.isActive TO B3.set_bind
 
116