ogre.rb 0.1-i386-mswin32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +79 -0
- data/Rakefile +291 -0
- data/doc_src/ogre.rb +246 -0
- data/doc_src/ois.rb +67 -0
- data/lib/application.rb +146 -0
- data/lib/application_frame_listener.rb +302 -0
- data/lib/application_loading_bar.rb +115 -0
- data/lib/constants.rb +51 -0
- data/lib/method_fixes.rb +42 -0
- data/lib/ogre.dll +0 -0
- data/lib/ruby_ois.dll +0 -0
- data/ogre.rb +25 -0
- data/platform.rb +23 -0
- data/samples/Ogre.log +279 -0
- data/samples/bsp.rb +76 -0
- data/samples/cg.dll +0 -0
- data/samples/grass.rb +325 -0
- data/samples/js3250.dll +0 -0
- data/samples/lighting.rb +138 -0
- data/samples/media/materials/programs/Grass.cg +30 -0
- data/samples/media/materials/programs/OffsetMapping.cg +97 -0
- data/samples/media/materials/programs/OffsetMapping.hlsl +135 -0
- data/samples/media/materials/programs/OffsetMappingFp.glsl +69 -0
- data/samples/media/materials/programs/OffsetMappingVp.glsl +54 -0
- data/samples/media/materials/programs/OffsetMapping_specular.asm +44 -0
- data/samples/media/materials/scripts/CloudySky.material +17 -0
- data/samples/media/materials/scripts/CubeMapping.material +34 -0
- data/samples/media/materials/scripts/Flare.material +17 -0
- data/samples/media/materials/scripts/Grass.material +63 -0
- data/samples/media/materials/scripts/Knot.material +14 -0
- data/samples/media/materials/scripts/MorningSkyBox.material +17 -0
- data/samples/media/materials/scripts/Offset.material +124 -0
- data/samples/media/materials/scripts/Ogre.material +119 -0
- data/samples/media/materials/scripts/RZR-002.material +15 -0
- data/samples/media/materials/scripts/Razor.material +14 -0
- data/samples/media/materials/scripts/Ribbon.material +19 -0
- data/samples/media/materials/scripts/RustySteel.material +14 -0
- data/samples/media/materials/scripts/SpaceSkyBox.material +17 -0
- data/samples/media/materials/scripts/SpaceSkyPlane.material +17 -0
- data/samples/media/materials/scripts/TextureEffects.material +15 -0
- data/samples/media/materials/scripts/dragon.material +42 -0
- data/samples/media/materials/scripts/smoke.material +18 -0
- data/samples/media/materials/textures/GreenSkin.jpg +0 -0
- data/samples/media/materials/textures/MtlPlat2.jpg +0 -0
- data/samples/media/materials/textures/RZR-002.png +0 -0
- data/samples/media/materials/textures/RustedMetal.jpg +0 -0
- data/samples/media/materials/textures/RustySteel.jpg +0 -0
- data/samples/media/materials/textures/Thumbs.db +0 -0
- data/samples/media/materials/textures/Water02.jpg +0 -0
- data/samples/media/materials/textures/WeirdEye.png +0 -0
- data/samples/media/materials/textures/clouds.jpg +0 -0
- data/samples/media/materials/textures/cursor.png +0 -0
- data/samples/media/materials/textures/dirt01.jpg +0 -0
- data/samples/media/materials/textures/flare.png +0 -0
- data/samples/media/materials/textures/gras_02.png +0 -0
- data/samples/media/materials/textures/grass_1024.jpg +0 -0
- data/samples/media/materials/textures/ogreborder.png +0 -0
- data/samples/media/materials/textures/ogreborderUp.png +0 -0
- data/samples/media/materials/textures/ribbonband.png +0 -0
- data/samples/media/materials/textures/rockwall.tga +0 -0
- data/samples/media/materials/textures/rockwall_NH.tga +0 -0
- data/samples/media/materials/textures/smoke.png +0 -0
- data/samples/media/materials/textures/smokecolors.png +0 -0
- data/samples/media/materials/textures/spacesky.jpg +0 -0
- data/samples/media/materials/textures/spheremap.png +0 -0
- data/samples/media/materials/textures/texmap2.jpg +0 -0
- data/samples/media/models/RZR-002.mesh +0 -0
- data/samples/media/models/geosphere4500.mesh +0 -0
- data/samples/media/models/geosphere8000.mesh +0 -0
- data/samples/media/models/knot.mesh +0 -0
- data/samples/media/models/ogrehead.mesh +0 -0
- data/samples/media/models/razor.mesh +0 -0
- data/samples/media/models/sphere.mesh +0 -0
- data/samples/media/overlays/CubeMapping.overlay +139 -0
- data/samples/media/packs/OgreCore.zip +0 -0
- data/samples/media/packs/chiropteraDM.pk3 +0 -0
- data/samples/media/packs/chiropteraDM.txt +99 -0
- data/samples/media/packs/cubemap.zip +0 -0
- data/samples/media/packs/cubemapsJS.zip +0 -0
- data/samples/media/packs/dragon.zip +0 -0
- data/samples/media/packs/skybox.zip +0 -0
- data/samples/media/particles/smoke.particle +43 -0
- data/samples/media.cfg +22 -0
- data/samples/ogre.cfg +19 -0
- data/samples/plugins.cfg +12 -0
- data/samples/quake3settings.cfg +2 -0
- data/samples/render_to_texture.rb +161 -0
- data/samples/resources.cfg +16 -0
- data/samples/sky_box.rb +107 -0
- data/samples/sky_dome.rb +86 -0
- data/samples/sky_plane.rb +27 -0
- data/samples/smoke.rb +23 -0
- data/samples/work/cube_mapping.rb +686 -0
- metadata +149 -0
data/samples/Ogre.log
ADDED
@@ -0,0 +1,279 @@
|
|
1
|
+
11:22:22: Creating resource group General
|
2
|
+
11:22:22: Creating resource group Internal
|
3
|
+
11:22:22: Creating resource group Autodetect
|
4
|
+
11:22:22: SceneManagerFactory for type 'DefaultSceneManager' registered.
|
5
|
+
11:22:22: Registering ResourceManager for type Material
|
6
|
+
11:22:22: Registering ResourceManager for type Mesh
|
7
|
+
11:22:22: Registering ResourceManager for type Skeleton
|
8
|
+
11:22:22: MovableObjectFactory for type 'ParticleSystem' registered.
|
9
|
+
11:22:22: OverlayElementFactory for type Panel registered.
|
10
|
+
11:22:22: OverlayElementFactory for type BorderPanel registered.
|
11
|
+
11:22:22: OverlayElementFactory for type TextArea registered.
|
12
|
+
11:22:22: Registering ResourceManager for type Font
|
13
|
+
11:22:22: ArchiveFactory for archive type FileSystem registered.
|
14
|
+
11:22:22: ArchiveFactory for archive type Zip registered.
|
15
|
+
11:22:22: FreeImage version: 3.9.2
|
16
|
+
11:22:22: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
|
17
|
+
11:22:22: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi
|
18
|
+
11:22:22: DDS codec registering
|
19
|
+
11:22:22: Registering ResourceManager for type HighLevelGpuProgram
|
20
|
+
11:22:22: Registering ResourceManager for type Compositor
|
21
|
+
11:22:22: MovableObjectFactory for type 'Entity' registered.
|
22
|
+
11:22:22: MovableObjectFactory for type 'Light' registered.
|
23
|
+
11:22:22: MovableObjectFactory for type 'BillboardSet' registered.
|
24
|
+
11:22:22: MovableObjectFactory for type 'ManualObject' registered.
|
25
|
+
11:22:22: MovableObjectFactory for type 'BillboardChain' registered.
|
26
|
+
11:22:22: MovableObjectFactory for type 'RibbonTrail' registered.
|
27
|
+
11:22:22: Loading library D:\Programming\engines\Ogre1.4.1SDK\bin\release\RenderSystem_GL
|
28
|
+
11:22:22: Installing plugin: GL RenderSystem
|
29
|
+
11:22:22: OpenGL Rendering Subsystem created.
|
30
|
+
11:22:22: Plugin successfully installed
|
31
|
+
11:22:22: Loading library D:\Programming\engines\Ogre1.4.1SDK\bin\release\RenderSystem_Direct3D9
|
32
|
+
11:22:22: Installing plugin: D3D9 RenderSystem
|
33
|
+
11:22:22: D3D9 : Direct3D9 Rendering Subsystem created.
|
34
|
+
11:22:22: D3D9: Driver Detection Starts
|
35
|
+
11:22:22: D3D9: Driver Detection Ends
|
36
|
+
11:22:22: Plugin successfully installed
|
37
|
+
11:22:22: Loading library D:\Programming\engines\Ogre1.4.1SDK\bin\release\Plugin_OctreeSceneManager
|
38
|
+
11:22:22: Installing plugin: Octree & Terrain Scene Manager
|
39
|
+
11:22:22: Plugin successfully installed
|
40
|
+
11:22:22: Loading library D:\Programming\engines\Ogre1.4.1SDK\bin\release\Plugin_ParticleFX
|
41
|
+
11:22:22: Installing plugin: ParticleFX
|
42
|
+
11:22:22: Particle Emitter Type 'Point' registered
|
43
|
+
11:22:22: Particle Emitter Type 'Box' registered
|
44
|
+
11:22:22: Particle Emitter Type 'Ellipsoid' registered
|
45
|
+
11:22:22: Particle Emitter Type 'Cylinder' registered
|
46
|
+
11:22:22: Particle Emitter Type 'Ring' registered
|
47
|
+
11:22:22: Particle Emitter Type 'HollowEllipsoid' registered
|
48
|
+
11:22:22: Particle Affector Type 'LinearForce' registered
|
49
|
+
11:22:22: Particle Affector Type 'ColourFader' registered
|
50
|
+
11:22:22: Particle Affector Type 'ColourFader2' registered
|
51
|
+
11:22:22: Particle Affector Type 'ColourImage' registered
|
52
|
+
11:22:22: Particle Affector Type 'ColourInterpolator' registered
|
53
|
+
11:22:22: Particle Affector Type 'Scaler' registered
|
54
|
+
11:22:22: Particle Affector Type 'Rotator' registered
|
55
|
+
11:22:22: Particle Affector Type 'DirectionRandomiser' registered
|
56
|
+
11:22:22: Particle Affector Type 'DeflectorPlane' registered
|
57
|
+
11:22:22: Plugin successfully installed
|
58
|
+
11:22:22: Loading library D:\Programming\engines\Ogre1.4.1SDK\bin\release\Plugin_BSPSceneManager
|
59
|
+
11:22:22: Installing plugin: BSP Scene Manager
|
60
|
+
11:22:22: Plugin successfully installed
|
61
|
+
11:22:22: Loading library D:\Programming\engines\Ogre1.4.1SDK\bin\release\Plugin_CgProgramManager
|
62
|
+
11:22:22: Installing plugin: Cg Program Manager
|
63
|
+
11:22:23: Plugin successfully installed
|
64
|
+
11:22:23: *-*-* OGRE Initialising
|
65
|
+
11:22:23: *-*-* Version 1.4.1 (Eihort)
|
66
|
+
11:22:23: Creating resource group Bootstrap
|
67
|
+
11:22:23: Added resource location './media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
|
68
|
+
11:22:23: Added resource location './media/' of type 'FileSystem' to resource group 'General'
|
69
|
+
11:22:23: Added resource location './media/materials' of type 'FileSystem' to resource group 'General'
|
70
|
+
11:22:23: Added resource location './media/materials/textures' of type 'FileSystem' to resource group 'General'
|
71
|
+
11:22:23: Added resource location './media/materials/scripts' of type 'FileSystem' to resource group 'General'
|
72
|
+
11:22:23: Added resource location './media/materials/programs' of type 'FileSystem' to resource group 'General'
|
73
|
+
11:22:23: Added resource location './media/models' of type 'FileSystem' to resource group 'General'
|
74
|
+
11:22:23: Added resource location './media/particles' of type 'FileSystem' to resource group 'General'
|
75
|
+
11:22:23: Added resource location './media/overlays' of type 'FileSystem' to resource group 'General'
|
76
|
+
11:22:23: Added resource location './media/packs/skybox.zip' of type 'Zip' to resource group 'General'
|
77
|
+
11:22:23: Added resource location './media/packs/dragon.zip' of type 'Zip' to resource group 'General'
|
78
|
+
11:22:23: Added resource location './media/packs/cubemap.zip' of type 'Zip' to resource group 'General'
|
79
|
+
11:22:23: Added resource location './media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'General'
|
80
|
+
11:22:23: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
|
81
|
+
11:22:23: D3D9 : RenderSystem Option: Anti aliasing = NonMaskable 4
|
82
|
+
11:22:23: D3D9 : RenderSystem Option: Floating-point mode = Fastest
|
83
|
+
11:22:23: D3D9 : RenderSystem Option: Full Screen = No
|
84
|
+
11:22:23: D3D9 : RenderSystem Option: Rendering Device = NVIDIA GeForce 6800 Series GPU
|
85
|
+
11:22:23: D3D9 : RenderSystem Option: VSync = No
|
86
|
+
11:22:23: D3D9 : RenderSystem Option: Video Mode = 1024 x 768 @ 32-bit colour
|
87
|
+
11:22:23: CPU Identifier & Features
|
88
|
+
11:22:23: -------------------------
|
89
|
+
11:22:23: * CPU ID: AuthenticAMD: AMD Athlon(tm) 64 Processor 3200+
|
90
|
+
11:22:23: * SSE: yes
|
91
|
+
11:22:23: * SSE2: yes
|
92
|
+
11:22:23: * SSE3: yes
|
93
|
+
11:22:23: * MMX: yes
|
94
|
+
11:22:23: * MMXEXT: yes
|
95
|
+
11:22:23: * 3DNOW: yes
|
96
|
+
11:22:23: * 3DNOWEXT: yes
|
97
|
+
11:22:23: * CMOV: yes
|
98
|
+
11:22:23: * TSC: yes
|
99
|
+
11:22:23: * FPU: yes
|
100
|
+
11:22:23: * PRO: yes
|
101
|
+
11:22:23: * HT: no
|
102
|
+
11:22:23: -------------------------
|
103
|
+
11:22:23: D3D9 : Subsystem Initialising
|
104
|
+
11:22:23: D3D9RenderSystem::createRenderWindow "OGRE Render Window", 1024x768 windowed miscParams: FSAA=1 FSAAQuality=3 colourDepth=32 useNVPerfHUD=false vsync=false
|
105
|
+
11:22:23: D3D9 : Created D3D9 Rendering Window 'OGRE Render Window' : 1024x768, 32bpp
|
106
|
+
11:22:23: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
|
107
|
+
11:22:23: Registering ResourceManager for type Texture
|
108
|
+
11:22:23: Registering ResourceManager for type GpuProgram
|
109
|
+
11:22:23: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
|
110
|
+
11:22:23: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
|
111
|
+
11:22:23: D3D9: Vertex texture format supported - PF_FLOAT32_R
|
112
|
+
11:22:23: RenderSystem capabilities
|
113
|
+
11:22:23: -------------------------
|
114
|
+
11:22:23: * Hardware generation of mipmaps: yes
|
115
|
+
11:22:23: * Texture blending: yes
|
116
|
+
11:22:23: * Anisotropic texture filtering: yes
|
117
|
+
11:22:23: * Dot product texture operation: yes
|
118
|
+
11:22:23: * Cube mapping: yes
|
119
|
+
11:22:23: * Hardware stencil buffer: yes
|
120
|
+
11:22:23: - Stencil depth: 8
|
121
|
+
11:22:23: - Two sided stencil support: yes
|
122
|
+
11:22:23: - Wrap stencil values: yes
|
123
|
+
11:22:23: * Hardware vertex / index buffers: yes
|
124
|
+
11:22:23: * Vertex programs: yes
|
125
|
+
11:22:23: - Max vertex program version: vs_3_0
|
126
|
+
11:22:23: * Fragment programs: yes
|
127
|
+
11:22:23: - Max fragment program version: ps_3_0
|
128
|
+
11:22:23: * Texture Compression: yes
|
129
|
+
11:22:23: - DXT: yes
|
130
|
+
11:22:23: - VTC: no
|
131
|
+
11:22:23: * Scissor Rectangle: yes
|
132
|
+
11:22:23: * Hardware Occlusion Query: yes
|
133
|
+
11:22:23: * User clip planes: yes
|
134
|
+
11:22:23: * VET_UBYTE4 vertex element type: yes
|
135
|
+
11:22:23: * Infinite far plane projection: yes
|
136
|
+
11:22:23: * Hardware render-to-texture: yes
|
137
|
+
11:22:23: * Floating point textures: yes
|
138
|
+
11:22:23: * Non-power-of-two textures: yes
|
139
|
+
11:22:23: * Volume textures: yes
|
140
|
+
11:22:23: * Multiple Render Targets: 4
|
141
|
+
11:22:23: * Point Sprites: yes
|
142
|
+
11:22:23: * Extended point parameters: yes
|
143
|
+
11:22:23: * Max Point Size: 8192
|
144
|
+
11:22:23: * Vertex texture fetch: yes
|
145
|
+
11:22:23: - Max vertex textures: 4
|
146
|
+
11:22:23: - Vertex textures shared: no
|
147
|
+
11:22:23: ***************************************
|
148
|
+
11:22:23: *** D3D9 : Subsystem Initialised OK ***
|
149
|
+
11:22:23: ***************************************
|
150
|
+
11:22:23: ResourceBackgroundQueue - threading disabled
|
151
|
+
11:22:23: Particle Renderer Type 'billboard' registered
|
152
|
+
11:22:23: SceneManagerFactory for type 'BspSceneManager' registered.
|
153
|
+
11:22:23: Registering ResourceManager for type BspLevel
|
154
|
+
11:22:23: SceneManagerFactory for type 'OctreeSceneManager' registered.
|
155
|
+
11:22:23: SceneManagerFactory for type 'TerrainSceneManager' registered.
|
156
|
+
11:22:23: Creating viewport on target 'OGRE Render Window', rendering from camera 'PlayerCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
|
157
|
+
11:22:23: Viewport for camera 'PlayerCam', actual dimensions L: 0 T: 0 W: 1024 H: 768
|
158
|
+
11:22:23: Parsing scripts for resource group Autodetect
|
159
|
+
11:22:23: Finished parsing scripts for resource group Autodetect
|
160
|
+
11:22:23: Parsing scripts for resource group Bootstrap
|
161
|
+
11:22:23: Parsing script OgreCore.material
|
162
|
+
11:22:23: Parsing script OgreProfiler.material
|
163
|
+
11:22:23: Parsing script Ogre.fontdef
|
164
|
+
11:22:23: Parsing script OgreDebugPanel.overlay
|
165
|
+
11:22:23: Texture: New_Ogre_Border_Center.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
|
166
|
+
11:22:23: Texture: New_Ogre_Border.png: Loading 1 faces(PF_A8R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
|
167
|
+
11:22:23: Texture: New_Ogre_Border_Break.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
|
168
|
+
11:22:23: Font BlueHighwayusing texture size 512x512
|
169
|
+
11:22:23: Info: Freetype returned null for character 127 in font BlueHighway
|
170
|
+
11:22:23: Info: Freetype returned null for character 128 in font BlueHighway
|
171
|
+
11:22:23: Info: Freetype returned null for character 129 in font BlueHighway
|
172
|
+
11:22:23: Info: Freetype returned null for character 130 in font BlueHighway
|
173
|
+
11:22:23: Info: Freetype returned null for character 131 in font BlueHighway
|
174
|
+
11:22:23: Info: Freetype returned null for character 132 in font BlueHighway
|
175
|
+
11:22:23: Info: Freetype returned null for character 133 in font BlueHighway
|
176
|
+
11:22:23: Info: Freetype returned null for character 134 in font BlueHighway
|
177
|
+
11:22:23: Info: Freetype returned null for character 135 in font BlueHighway
|
178
|
+
11:22:23: Info: Freetype returned null for character 136 in font BlueHighway
|
179
|
+
11:22:23: Info: Freetype returned null for character 137 in font BlueHighway
|
180
|
+
11:22:23: Info: Freetype returned null for character 138 in font BlueHighway
|
181
|
+
11:22:23: Info: Freetype returned null for character 139 in font BlueHighway
|
182
|
+
11:22:23: Info: Freetype returned null for character 140 in font BlueHighway
|
183
|
+
11:22:23: Info: Freetype returned null for character 141 in font BlueHighway
|
184
|
+
11:22:23: Info: Freetype returned null for character 142 in font BlueHighway
|
185
|
+
11:22:23: Info: Freetype returned null for character 143 in font BlueHighway
|
186
|
+
11:22:23: Info: Freetype returned null for character 144 in font BlueHighway
|
187
|
+
11:22:23: Info: Freetype returned null for character 145 in font BlueHighway
|
188
|
+
11:22:23: Info: Freetype returned null for character 146 in font BlueHighway
|
189
|
+
11:22:23: Info: Freetype returned null for character 147 in font BlueHighway
|
190
|
+
11:22:23: Info: Freetype returned null for character 148 in font BlueHighway
|
191
|
+
11:22:23: Info: Freetype returned null for character 149 in font BlueHighway
|
192
|
+
11:22:23: Info: Freetype returned null for character 150 in font BlueHighway
|
193
|
+
11:22:23: Info: Freetype returned null for character 151 in font BlueHighway
|
194
|
+
11:22:23: Info: Freetype returned null for character 152 in font BlueHighway
|
195
|
+
11:22:23: Info: Freetype returned null for character 153 in font BlueHighway
|
196
|
+
11:22:23: Info: Freetype returned null for character 154 in font BlueHighway
|
197
|
+
11:22:23: Info: Freetype returned null for character 155 in font BlueHighway
|
198
|
+
11:22:23: Info: Freetype returned null for character 156 in font BlueHighway
|
199
|
+
11:22:23: Info: Freetype returned null for character 157 in font BlueHighway
|
200
|
+
11:22:23: Info: Freetype returned null for character 158 in font BlueHighway
|
201
|
+
11:22:23: Info: Freetype returned null for character 159 in font BlueHighway
|
202
|
+
11:22:23: Info: Freetype returned null for character 160 in font BlueHighway
|
203
|
+
11:22:23: Texture: BlueHighwayTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
|
204
|
+
11:22:23: Texture: ogretext.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
|
205
|
+
11:22:23: Parsing script OgreLoadingPanel.overlay
|
206
|
+
11:22:23: Finished parsing scripts for resource group Bootstrap
|
207
|
+
11:22:23: Parsing scripts for resource group General
|
208
|
+
11:22:23: Parsing script CloudySky.material
|
209
|
+
11:22:23: Parsing script CubeMapping.material
|
210
|
+
11:22:23: Parsing script dragon.material
|
211
|
+
11:22:23: Parsing script Flare.material
|
212
|
+
11:22:23: Parsing script Grass.material
|
213
|
+
11:22:23: Parsing script Knot.material
|
214
|
+
11:22:23: Parsing script MorningSkyBox.material
|
215
|
+
11:22:23: Parsing script Offset.material
|
216
|
+
11:22:23: Parsing script Ogre.material
|
217
|
+
11:22:23: Parsing script Razor.material
|
218
|
+
11:22:23: Parsing script Ribbon.material
|
219
|
+
11:22:23: Parsing script RustySteel.material
|
220
|
+
11:22:23: Parsing script RZR-002.material
|
221
|
+
11:22:23: Parsing script smoke.material
|
222
|
+
11:22:23: Parsing script SpaceSkyBox.material
|
223
|
+
11:22:23: Parsing script SpaceSkyPlane.material
|
224
|
+
11:22:23: Parsing script TextureEffects.material
|
225
|
+
11:22:23: Parsing script smoke.particle
|
226
|
+
11:22:23: Parsing script CubeMapping.overlay
|
227
|
+
11:22:23: Finished parsing scripts for resource group General
|
228
|
+
11:22:23: Parsing scripts for resource group Internal
|
229
|
+
11:22:23: Finished parsing scripts for resource group Internal
|
230
|
+
11:22:23: Texture: stevecube_fr.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
|
231
|
+
11:22:23: Texture: stevecube_bk.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
|
232
|
+
11:22:23: Texture: stevecube_lf.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
|
233
|
+
11:22:23: Texture: stevecube_rt.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
|
234
|
+
11:22:23: Texture: stevecube_up.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
|
235
|
+
11:22:23: Texture: stevecube_dn.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
|
236
|
+
11:22:23: Texture: flare.png: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
|
237
|
+
11:22:23: Texture: grass_1024.jpg: Loading 1 faces(PF_R8G8B8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
|
238
|
+
11:22:23: WARNING: Mesh instance 'grassblades' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
|
239
|
+
11:22:23: Texture: gras_02.png: Loading 1 faces(PF_A8R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
|
240
|
+
11:22:24: Mesh: Loading ogrehead.mesh.
|
241
|
+
11:22:24: Texture: WeirdEye.png: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
|
242
|
+
11:22:24: Texture: GreenSkin.jpg: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
|
243
|
+
11:22:24: Texture: spheremap.png: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
|
244
|
+
11:22:24: Texture: dirt01.jpg: Loading 1 faces(PF_R8G8B8,96x96x1) with 6 generated mipmaps from Image. Internal format is PF_X8R8G8B8,96x96x1.
|
245
|
+
11:22:24: Texture: rockwall_NH.tga: Loading 1 faces(PF_A8R8G8B8,64x64x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x64x1.
|
246
|
+
11:22:24: Texture: rockwall.tga: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
|
247
|
+
11:22:24: *** Initializing OIS ***
|
248
|
+
11:22:39: Unregistering ResourceManager for type BspLevel
|
249
|
+
11:22:39: *-*-* OGRE Shutdown
|
250
|
+
11:22:39: Unregistering ResourceManager for type Compositor
|
251
|
+
11:22:39: Unregistering ResourceManager for type Font
|
252
|
+
11:22:39: Unregistering ResourceManager for type Skeleton
|
253
|
+
11:22:39: Unregistering ResourceManager for type Mesh
|
254
|
+
11:22:39: Unregistering ResourceManager for type HighLevelGpuProgram
|
255
|
+
11:22:39: Uninstalling plugin: Cg Program Manager
|
256
|
+
11:22:39: Plugin successfully uninstalled
|
257
|
+
11:22:39: Unloading library D:\Programming\engines\Ogre1.4.1SDK\bin\release\Plugin_CgProgramManager
|
258
|
+
11:22:39: Uninstalling plugin: BSP Scene Manager
|
259
|
+
11:22:39: Plugin successfully uninstalled
|
260
|
+
11:22:39: Unloading library D:\Programming\engines\Ogre1.4.1SDK\bin\release\Plugin_BSPSceneManager
|
261
|
+
11:22:39: Uninstalling plugin: ParticleFX
|
262
|
+
11:22:39: Plugin successfully uninstalled
|
263
|
+
11:22:39: Unloading library D:\Programming\engines\Ogre1.4.1SDK\bin\release\Plugin_ParticleFX
|
264
|
+
11:22:39: Uninstalling plugin: Octree & Terrain Scene Manager
|
265
|
+
11:22:39: Plugin successfully uninstalled
|
266
|
+
11:22:39: Unloading library D:\Programming\engines\Ogre1.4.1SDK\bin\release\Plugin_OctreeSceneManager
|
267
|
+
11:22:39: Uninstalling plugin: D3D9 RenderSystem
|
268
|
+
11:22:39: Render Target 'OGRE Render Window' Average FPS: 168.375 Best FPS: 176.823 Worst FPS: 164.694
|
269
|
+
11:22:39: D3D9 : Shutting down cleanly.
|
270
|
+
11:22:39: Unregistering ResourceManager for type Texture
|
271
|
+
11:22:39: Unregistering ResourceManager for type GpuProgram
|
272
|
+
11:22:39: D3D9 : Direct3D9 Rendering Subsystem destroyed.
|
273
|
+
11:22:39: Plugin successfully uninstalled
|
274
|
+
11:22:39: Unloading library D:\Programming\engines\Ogre1.4.1SDK\bin\release\RenderSystem_Direct3D9
|
275
|
+
11:22:39: Uninstalling plugin: GL RenderSystem
|
276
|
+
11:22:39: *** Stopping Win32GL Subsystem ***
|
277
|
+
11:22:39: Plugin successfully uninstalled
|
278
|
+
11:22:39: Unloading library D:\Programming\engines\Ogre1.4.1SDK\bin\release\RenderSystem_GL
|
279
|
+
11:22:39: Unregistering ResourceManager for type Material
|
data/samples/bsp.rb
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
|
3
|
+
$: << File.dirname(__FILE__) + "/.."
|
4
|
+
require 'ogre'
|
5
|
+
require 'application'
|
6
|
+
require 'application_loading_bar'
|
7
|
+
include Ogre
|
8
|
+
|
9
|
+
class BSPApplication < Application
|
10
|
+
def initialize
|
11
|
+
super
|
12
|
+
|
13
|
+
#@loading_bar = ApplicationLoadingBar.new
|
14
|
+
@quake_level = ""
|
15
|
+
@quake_pk3 = ""
|
16
|
+
@loading_bar = ApplicationLoadingBar.new
|
17
|
+
end
|
18
|
+
|
19
|
+
def load_resources
|
20
|
+
@loading_bar.start(window, 1, 1, 0.75)
|
21
|
+
|
22
|
+
# Turn off rendering of all but overlays
|
23
|
+
scene_manager.clear_special_case_render_queues
|
24
|
+
scene_manager.add_special_case_render_queue(RENDER_QUEUE_OVERLAY)
|
25
|
+
scene_manager.set_special_case_render_queue_mode(SceneManager::SCRQM_INCLUDE)
|
26
|
+
|
27
|
+
rgm = ResourceGroupManager.instance
|
28
|
+
|
29
|
+
# World geometry link
|
30
|
+
rgm.link_world_geometry_to_resource_group(
|
31
|
+
rgm.get_world_resource_group_name,
|
32
|
+
@quake_level, scene_manager)
|
33
|
+
|
34
|
+
# Initialize the rest of the groups, parse
|
35
|
+
rgm.initialise_all_resource_groups
|
36
|
+
rgm.load_resource_group rgm.get_world_resource_group_name, false, true
|
37
|
+
|
38
|
+
# Full rendering
|
39
|
+
scene_manager.clear_special_case_render_queues
|
40
|
+
scene_manager.set_special_case_render_queue_mode(SceneManager::SCRQM_EXCLUDE)
|
41
|
+
|
42
|
+
@loading_bar.finish
|
43
|
+
end
|
44
|
+
|
45
|
+
def setup_resources
|
46
|
+
file = ConfigFile.new
|
47
|
+
file.load("quake3settings.cfg")
|
48
|
+
@quake_level = file.get_setting("Map")
|
49
|
+
@quake_pk3 = file.get_setting("Pak0Location")
|
50
|
+
|
51
|
+
super
|
52
|
+
|
53
|
+
ResourceGroupManager.instance.add_resource_location(@quake_pk3,
|
54
|
+
"Zip", ResourceGroupManager.instance.get_world_resource_group_name, true)
|
55
|
+
end
|
56
|
+
|
57
|
+
def choose_scene_manager
|
58
|
+
self.scene_manager = root.create_scene_manager("BspSceneManager")
|
59
|
+
end
|
60
|
+
|
61
|
+
def create_scene
|
62
|
+
camera.set_near_clip_distance 4
|
63
|
+
camera.set_far_clip_distance 4000
|
64
|
+
|
65
|
+
vp = scene_manager.get_suggested_viewpoint(true)
|
66
|
+
|
67
|
+
camera.set_position(vp.position)
|
68
|
+
camera.pitch(Degree.new(90))
|
69
|
+
camera.rotate(vp.orientation)
|
70
|
+
|
71
|
+
camera.set_fixed_yaw_axis(true, Vector3.UNIT_Z)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
app = BSPApplication.new
|
76
|
+
app.go
|
data/samples/cg.dll
ADDED
Binary file
|
data/samples/grass.rb
ADDED
@@ -0,0 +1,325 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
|
3
|
+
$: << File.dirname(__FILE__) + "/.."
|
4
|
+
require 'ogre'
|
5
|
+
require 'application'
|
6
|
+
include Ogre
|
7
|
+
|
8
|
+
GRASS_HEIGHT = 300
|
9
|
+
GRASS_WIDTH = 250
|
10
|
+
GRASS_MESH_NAME = "grassblades"
|
11
|
+
GRASS_MATERIAL = "GrassBlades"
|
12
|
+
OFFSET_PARAM = 999
|
13
|
+
|
14
|
+
$anim_state = nil
|
15
|
+
$static_geom = nil
|
16
|
+
|
17
|
+
class GrassListener < ApplicationFrameListener
|
18
|
+
|
19
|
+
def initialize(root, win, cam, scene_manager)
|
20
|
+
super(root, win, cam)
|
21
|
+
@scene_manager = scene_manager
|
22
|
+
@show_bbs = false
|
23
|
+
|
24
|
+
@xinc = Math::PI * 0.4
|
25
|
+
@zinc = Math::PI * 0.55
|
26
|
+
@xpos = Ogre::Math.range_random(-Math::PI, Math::PI)
|
27
|
+
@zpos = Ogre::Math.range_random(-Math::PI, Math::PI)
|
28
|
+
@offset = Vector4.new(0,0,0,0)
|
29
|
+
|
30
|
+
@time_delay = 0.0
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
def wave_grass(time_elapsed)
|
35
|
+
# May not be setup yet
|
36
|
+
return if $static_geom.nil?
|
37
|
+
|
38
|
+
@xpos += @xinc * time_elapsed
|
39
|
+
@zpos += @zinc * time_elapsed
|
40
|
+
|
41
|
+
rit = $static_geom.get_region_iterator
|
42
|
+
|
43
|
+
while rit.has_more_elements
|
44
|
+
reg = rit.get_next
|
45
|
+
|
46
|
+
@xpos += reg.get_centre.x * 0.001
|
47
|
+
@zpos += reg.get_centre.z * 0.001
|
48
|
+
@offset.x = Ogre::Math.sin(@xpos) * 0.5
|
49
|
+
@offset.z = Ogre::Math.sin(@zpos) * 0.05
|
50
|
+
|
51
|
+
lod_it = reg.get_lod_iterator
|
52
|
+
|
53
|
+
while lod_it.has_more_elements
|
54
|
+
lod = lod_it.get_next
|
55
|
+
mat_it = lod.get_material_iterator
|
56
|
+
while mat_it.has_more_elements
|
57
|
+
mat = mat_it.get_next
|
58
|
+
geom_it = mat.get_geometry_iterator
|
59
|
+
while geom_it.has_more_elements
|
60
|
+
geom = geom_it.get_next
|
61
|
+
geom.as_renderable.set_custom_parameter(OFFSET_PARAM, @offset)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def frame_started(event)
|
69
|
+
return false unless super
|
70
|
+
|
71
|
+
@time_delay -= event.time_since_last_frame
|
72
|
+
|
73
|
+
if $anim_state
|
74
|
+
$anim_state.add_time(event.time_since_last_frame)
|
75
|
+
end
|
76
|
+
|
77
|
+
if keyboard.key_down?(OIS::KC_B) && time_delay <= 0
|
78
|
+
@time_delay = 1
|
79
|
+
@show_bbs = !@show_bbs
|
80
|
+
@scene_manager.show_bounding_boxes(@show_bbs)
|
81
|
+
end
|
82
|
+
|
83
|
+
wave_grass(event.time_since_last_frame)
|
84
|
+
|
85
|
+
true
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
class GrassApplication < Application
|
90
|
+
def create_grass_mesh
|
91
|
+
mesh = MeshManager.instance.create_manual(GRASS_MESH_NAME,
|
92
|
+
ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME)
|
93
|
+
sm = mesh.create_sub_mesh
|
94
|
+
sm.use_shared_vertices = false
|
95
|
+
sm.vertex_data = VertexData.new
|
96
|
+
sm.vertex_data.vertex_start = 0
|
97
|
+
sm.vertex_data.vertex_count = 12
|
98
|
+
|
99
|
+
decl = sm.vertex_data.vertex_declaration
|
100
|
+
offset = 0
|
101
|
+
|
102
|
+
decl.add_element(0, offset, VET_FLOAT3, VES_POSITION)
|
103
|
+
offset += VertexElement.get_type_size(VET_FLOAT3)
|
104
|
+
decl.add_element(0, offset, VET_FLOAT3, VES_NORMAL)
|
105
|
+
offset += VertexElement.get_type_size(VET_FLOAT3)
|
106
|
+
decl.add_element(0, offset, VET_FLOAT2, VES_TEXTURE_COORDINATES)
|
107
|
+
offset += VertexElement.get_type_size(VET_FLOAT2)
|
108
|
+
|
109
|
+
vbuf = HardwareBufferManager.instance.create_vertex_buffer(
|
110
|
+
offset, 12, HardwareBuffer::HBU_STATIC_WRITE_ONLY)
|
111
|
+
reals = vbuf.lock(HardwareBuffer::HBL_DISCARD)
|
112
|
+
|
113
|
+
base_vec = Vector3.new(GRASS_WIDTH / 2, 0, 0)
|
114
|
+
vec = Vector3.new(GRASS_WIDTH / 2, 0, 0)
|
115
|
+
rot = Quaternion.new
|
116
|
+
rot.from_angle_axis(Degree.new(60), Vector3.UNIT_Y)
|
117
|
+
|
118
|
+
3.times do |i|
|
119
|
+
x = i * 32
|
120
|
+
# Position
|
121
|
+
reals[x + 0] = -vec.x
|
122
|
+
reals[x + 1] = GRASS_HEIGHT
|
123
|
+
reals[x + 2] = -vec.z
|
124
|
+
# Normal
|
125
|
+
reals[x + 3] = 0
|
126
|
+
reals[x + 4] = 1
|
127
|
+
reals[x + 5] = 0
|
128
|
+
# UV
|
129
|
+
reals[x + 6] = 0
|
130
|
+
reals[x + 7] = 0
|
131
|
+
|
132
|
+
# Position
|
133
|
+
reals[x + 8] = vec.x
|
134
|
+
reals[x + 9] = GRASS_HEIGHT
|
135
|
+
reals[x + 10] = vec.z
|
136
|
+
# Normal
|
137
|
+
reals[x + 11] = 0
|
138
|
+
reals[x + 12] = 1
|
139
|
+
reals[x + 13] = 0
|
140
|
+
# UV
|
141
|
+
reals[x + 14] = 1
|
142
|
+
reals[x + 15] = 0
|
143
|
+
|
144
|
+
# Position
|
145
|
+
reals[x + 16] = -vec.x
|
146
|
+
reals[x + 17] = 0
|
147
|
+
reals[x + 18] = -vec.z
|
148
|
+
# Normal
|
149
|
+
reals[x + 19] = 0
|
150
|
+
reals[x + 20] = 1
|
151
|
+
reals[x + 21] = 0
|
152
|
+
# UV
|
153
|
+
reals[x + 22] = 0
|
154
|
+
reals[x + 23] = 1
|
155
|
+
|
156
|
+
# Position
|
157
|
+
reals[x + 24] = vec.x
|
158
|
+
reals[x + 25] = 0
|
159
|
+
reals[x + 26] = vec.z
|
160
|
+
# Normal
|
161
|
+
reals[x + 27] = 0
|
162
|
+
reals[x + 28] = 1
|
163
|
+
reals[x + 29] = 0
|
164
|
+
# UV
|
165
|
+
reals[x + 30] = 1
|
166
|
+
reals[x + 31] = 1
|
167
|
+
|
168
|
+
vec = rot * vec
|
169
|
+
end
|
170
|
+
|
171
|
+
vbuf.unlock
|
172
|
+
|
173
|
+
sm.vertex_data.vertex_buffer_binding.set_binding(0, vbuf)
|
174
|
+
sm.index_data.index_count = 6 * 3
|
175
|
+
sm.index_data.index_buffer = HardwareBufferManager.instance.
|
176
|
+
create_index_buffer(HardwareIndexBuffer::IT_16BIT, 6 * 3,
|
177
|
+
HardwareBuffer::HBU_STATIC_WRITE_ONLY)
|
178
|
+
index = sm.index_data.index_buffer.lock(HardwareBuffer::HBL_DISCARD)
|
179
|
+
|
180
|
+
3.times do |i|
|
181
|
+
x = i * 6
|
182
|
+
off = i * 4
|
183
|
+
|
184
|
+
index[x + 0] = 0 + off
|
185
|
+
index[x + 1] = 3 + off
|
186
|
+
index[x + 2] = 1 + off
|
187
|
+
|
188
|
+
index[x + 3] = 0 + off
|
189
|
+
index[x + 4] = 2 + off
|
190
|
+
index[x + 5] = 3 + off
|
191
|
+
end
|
192
|
+
|
193
|
+
sm.index_data.index_buffer.unlock
|
194
|
+
|
195
|
+
sm.set_material_name(GRASS_MATERIAL)
|
196
|
+
mesh.load
|
197
|
+
end
|
198
|
+
|
199
|
+
def setup_lighting
|
200
|
+
scene_manager.set_ambient_light ColourValue.new(0.2, 0.2, 0.2)
|
201
|
+
|
202
|
+
# Point light, movable, reddish
|
203
|
+
@light = scene_manager.create_light("Light2")
|
204
|
+
@light.set_diffuse_colour(@min_light_colour)
|
205
|
+
@light.set_specular_colour(1, 1, 1)
|
206
|
+
@light.set_attenuation(8000, 1, 0.0005, 0)
|
207
|
+
|
208
|
+
@light_node = scene_manager.root_scene_node.create_child_scene_node("MovingLightNode")
|
209
|
+
@light_node.attach_object(@light)
|
210
|
+
|
211
|
+
bbs = scene_manager.create_billboard_set("lightbbs", 1)
|
212
|
+
bbs.set_material_name("Flare")
|
213
|
+
bb = bbs.create_billboard(0, 0, 0, @min_light_colour)
|
214
|
+
@light_node.attach_object(bbs)
|
215
|
+
|
216
|
+
# TODO Controller code
|
217
|
+
|
218
|
+
@light_node.set_position(Vector3.new(300, 250, -300))
|
219
|
+
|
220
|
+
anim = scene_manager.create_animation("LightTrack", 20)
|
221
|
+
# Spline it
|
222
|
+
anim.set_interpolation_mode(Animation::IM_SPLINE)
|
223
|
+
track = anim.create_node_track(0, @light_node)
|
224
|
+
|
225
|
+
key = track.create_node_key_frame(0)
|
226
|
+
key.set_translate(Vector3.new(300,550,-300))
|
227
|
+
key = track.create_node_key_frame(2)#B
|
228
|
+
key.set_translate(Vector3.new(150,600,-250))
|
229
|
+
key = track.create_node_key_frame(4)#C
|
230
|
+
key.set_translate(Vector3.new(-150,650,-100))
|
231
|
+
key = track.create_node_key_frame(6)#D
|
232
|
+
key.set_translate(Vector3.new(-400,500,-200))
|
233
|
+
key = track.create_node_key_frame(8)#E
|
234
|
+
key.set_translate(Vector3.new(-200,500,-400))
|
235
|
+
key = track.create_node_key_frame(10)#F
|
236
|
+
key.set_translate(Vector3.new(-100,450,-200))
|
237
|
+
key = track.create_node_key_frame(12)#G
|
238
|
+
key.set_translate(Vector3.new(-100,400,180))
|
239
|
+
key = track.create_node_key_frame(14)#H
|
240
|
+
key.set_translate(Vector3.new(0,250,600))
|
241
|
+
key = track.create_node_key_frame(16)#I
|
242
|
+
key.set_translate(Vector3.new(100,650,100))
|
243
|
+
key = track.create_node_key_frame(18)#J
|
244
|
+
key.set_translate(Vector3.new(250,600,0))
|
245
|
+
key = track.create_node_key_frame(20)#K == A
|
246
|
+
key.set_translate(Vector3.new(300,550,-300))
|
247
|
+
# Create a new animation state to track this
|
248
|
+
$anim_state = scene_manager.create_animation_state("LightTrack")
|
249
|
+
$anim_state.set_enabled(true)
|
250
|
+
end
|
251
|
+
|
252
|
+
def create_scene
|
253
|
+
@min_light_colour = ColourValue.new(0.5, 0.1, 0.0)
|
254
|
+
|
255
|
+
scene_manager.set_sky_box(true, "SpaceSkyBox")
|
256
|
+
|
257
|
+
setup_lighting
|
258
|
+
|
259
|
+
plane = Plane.new
|
260
|
+
plane.normal = Vector3.UNIT_Y
|
261
|
+
plane.d = 0
|
262
|
+
|
263
|
+
MeshManager.instance.create_plane("MyPlane",
|
264
|
+
ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, plane,
|
265
|
+
14500, 14500, 10, 10, true, 1, 50, 50, Vector3.UNIT_Z)
|
266
|
+
|
267
|
+
plane_ent = scene_manager.create_entity("plane", "MyPlane")
|
268
|
+
plane_ent.set_material_name("GrassFloor")
|
269
|
+
plane_ent.set_cast_shadows(false)
|
270
|
+
scene_manager.root_scene_node.create_child_scene_node.attach_object(plane_ent)
|
271
|
+
|
272
|
+
min_v = Vector3.new(-2000, 0, -2000)
|
273
|
+
max_v = Vector3.new(2000, 0, 2000)
|
274
|
+
|
275
|
+
create_grass_mesh
|
276
|
+
|
277
|
+
e = scene_manager.create_entity("1", GRASS_MESH_NAME)
|
278
|
+
|
279
|
+
s = scene_manager.create_static_geometry("bing")
|
280
|
+
s.set_region_dimensions(Vector3.new(1000, 1000, 1000))
|
281
|
+
s.set_origin(Vector3.new(-500, 500, -500))
|
282
|
+
|
283
|
+
-1950.step(1950, 150) do |x|
|
284
|
+
-1950.step(1950, 150) do |z|
|
285
|
+
pos = Vector3.new(x + Ogre::Math.range_random(-25, 25),
|
286
|
+
0,
|
287
|
+
z + Ogre::Math.range_random(-25, 25))
|
288
|
+
orientation = Quaternion.new
|
289
|
+
orientation.from_angle_axis(
|
290
|
+
Degree.new(Ogre::Math.range_random(0, 359)), Vector3.UNIT_Y)
|
291
|
+
scale = Vector3.new(1, Ogre::Math.range_random(0.85, 1.15), 1)
|
292
|
+
s.add_entity(e, pos, orientation, scale)
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
s.build
|
297
|
+
$static_geom = s
|
298
|
+
|
299
|
+
# Gots to have the Ogre head
|
300
|
+
m = MeshManager.instance.load("ogrehead.mesh",
|
301
|
+
ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME)
|
302
|
+
src = 0
|
303
|
+
dest = 0
|
304
|
+
ret, src, dest = m.suggest_tangent_vector_build_params(VES_TANGENT)
|
305
|
+
unless ret
|
306
|
+
m.build_tangent_vectors(VES_TANGENT, src, dest)
|
307
|
+
end
|
308
|
+
|
309
|
+
e = scene_manager.create_entity("head", "ogrehead.mesh")
|
310
|
+
e.set_material_name("OffsetMapping/Specular")
|
311
|
+
head_node = scene_manager.root_scene_node.create_child_scene_node
|
312
|
+
head_node.attach_object(e)
|
313
|
+
head_node.set_scale(7, 7, 7)
|
314
|
+
head_node.set_position(0, 200, 0)
|
315
|
+
e.set_normalise_normals(true)
|
316
|
+
camera.move(Vector3.new(0, 350, 0))
|
317
|
+
end
|
318
|
+
|
319
|
+
def create_frame_listener
|
320
|
+
self.frame_listener = GrassListener.new(root, window, camera, scene_manager)
|
321
|
+
end
|
322
|
+
end
|
323
|
+
|
324
|
+
app = GrassApplication.new
|
325
|
+
app.go
|
data/samples/js3250.dll
ADDED
Binary file
|