Esempio n. 1
0
 protected override void PostAttached(SystemRegistry registry)
 {
     _gs      = registry.GetSystem <GraphicsSystem>();
     _ad      = registry.GetSystem <AssetSystem>().Database;
     _texture = Texture.Get(_ad);
     _cameraDistanceComparer = new CameraDistanceComparer(_gs);
     _gs.ExecuteOnMainThread(() => InitializeContextObjects(_gs.Context, _gs.MaterialCache, _gs.BufferCache));
 }
Esempio n. 2
0
File: Skybox.cs Progetto: zhuowp/ge
        protected override void Attached(SystemRegistry registry)
        {
            _gs = registry.GetSystem <GraphicsSystem>();
            _as = registry.GetSystem <AssetSystem>();
            var ad = _as.Database;

            RecreateCubemapTexture();
            _gs.ExecuteOnMainThread(() => InitializeContextObjects(ad, _gs.Context));
        }
Esempio n. 3
0
        public TextBuffer(GraphicsSystem gs)
        {
            _rc           = gs.Context;
            _providers[0] = _screenOrthoProjection;
            _ib           = _rc.ResourceFactory.CreateIndexBuffer(600, false);
            _material     = CreateMaterial(_rc);
            _dss          = _rc.ResourceFactory.CreateDepthStencilState(false, DepthComparison.LessEqual);

            _textLayout = new TextLayout();
            _textFormat = new TextFormat();
        }
Esempio n. 4
0
 protected override void Attached(SystemRegistry registry)
 {
     _gs      = registry.GetSystem <GraphicsSystem>();
     _ad      = registry.GetSystem <AssetSystem>().Database;
     _texture = Texture.Get(_ad);
     _mesh    = Mesh.Get(_ad);
     _centeredBoundingSphere = _mesh.GetBoundingSphere();
     _centeredBoundingBox    = _mesh.GetBoundingBox();
     _gs.ExecuteOnMainThread(() =>
     {
         InitializeContextObjects(_gs.Context, _gs.MaterialCache, _gs.BufferCache);
     });
 }
Esempio n. 5
0
File: Camera.cs Progetto: zhuowp/ge
 protected override void Attached(SystemRegistry registry)
 {
     _gs = registry.GetSystem <GraphicsSystem>();
 }
Esempio n. 6
0
 public MaterialCache(GraphicsSystem gs)
 {
     _gs      = gs;
     _factory = gs.Context.ResourceFactory;
 }
Esempio n. 7
0
File: Text2D.cs Progetto: zhuowp/ge
 protected override void Attached(SystemRegistry registry)
 {
     _gs = registry.GetSystem <GraphicsSystem>();
     _as = registry.GetSystem <AssetSystem>();
     _gs.ExecuteOnMainThread(InitializeContextObjects);
 }
Esempio n. 8
0
 public CameraDistanceComparer(GraphicsSystem gs)
 {
     _gs = gs;
 }
Esempio n. 9
0
 public BufferCache(GraphicsSystem gs)
 {
     _gs      = gs;
     _factory = gs.Context.ResourceFactory;
 }