Ejemplo n.º 1
0
        public RenderingContext3D(Control targetRenderArea, GraphicsProfile profile, CommonDeviceInterface cdi,
                                  HashTableSettings localSettings)
        {
            isDeviceLost = false;
            isActive     = false;
            hasFocus     = false;

            this.targetRenderArea = targetRenderArea;
            outProfile            = profile;
            log = cdi.GeneralLog;

            presentParams = new PresentParameters();
            outCaps       = cdi.DeviceCaps;

            layers = new LayerStack();

            InitializeEnvironment(cdi, localSettings);

            view3D      = new RenderingView3DPer(Matrix.Identity, Matrix.Identity);
            view3D.Near = 0.1f;
            view3D.Far  = 25;

            int sceneSize = 60;

            sManager = new GenericSceneManager <SceneEntity>(gDevice, outSettings,
                                                             new Vector3(sceneSize / 2f, sceneSize / 2f, sceneSize / 2f), sceneSize);
        }
Ejemplo n.º 2
0
        public RenderingContext3D(Control targetRenderArea, GraphicsProfile profile, CommonDeviceInterface cdi,
                                  HashTableSettings localSettings)
        {
            isDeviceLost = false;
            isActive = false;
            hasFocus = false;

            this.targetRenderArea = targetRenderArea;
            outProfile = profile;
            log = cdi.GeneralLog;

            presentParams = new PresentParameters();
            outCaps = cdi.DeviceCaps;

            layers = new LayerStack();

            InitializeEnvironment(cdi, localSettings);

            view3D = new RenderingView3DPer(Matrix.Identity, Matrix.Identity);
            view3D.Near = 0.1f;
            view3D.Far = 25;

            int sceneSize = 60;
            sManager = new GenericSceneManager<SceneEntity>(gDevice, outSettings,
                                                            new Vector3(sceneSize / 2f, sceneSize / 2f, sceneSize / 2f), sceneSize);
        }