~crempp/psg/devel

« back to all changes in this revision

Viewing changes to tests/skybox_viewer.py

  • Committer: Administrator
  • Date: 2009-12-14 04:46:06 UTC
  • Revision ID: administrator@gauss-20091214044606-deet4mtmsh0rwz52
Broken!

* Organized code into modules but did not fix it to work. In order to do this I had to remove the gui directory so I can add the GUI directory in the next commit.
* Began work on skybox extension.

Chad

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import direct.directbase.DirectStart
 
2
from direct.showbase.DirectObject import DirectObject
 
3
import sys
 
4
 
 
5
class World(DirectObject):
 
6
        def __init__(self):
 
7
                sys.path.append('../src')
 
8
                from SkyBox import SkyBox
 
9
                base.camLens.setFov(60)
 
10
                camera.setPos(0,0,0)
 
11
                sb = SkyBox(render,
 
12
                            modelFile="../data/models/skybox_02.egg",
 
13
                            shaderFile="../data/shaders/sky.sha",
 
14
                            textureFile1="../data/textures/tex_skybox_01.jpg",
 
15
                            textureFile2="../data/textures/tex_skybox_cloud.png")
 
16
                
 
17
                sb.render()
 
18
                
 
19
w = World()
 
20
run()