Map assimp materials to OpenGl materials and shaders. Each scene has its own MaterialMapper, which is accessible via the Scene.MaterialMapper property. The class interface is implemented for every type of renderer.
Наследование: IDisposable
Пример #1
0
 private void CreateRenderingBackend()
 {
     Debug.Assert(_renderer == null);
     if (GraphicsSettings.Default.RenderingBackend == 0)
     {
         _mapper   = new MaterialMapperClassicGl(this);
         _renderer = new SceneRendererClassicGl(this, _sceneMin, _sceneMax);
     }
     else
     {
         _mapper   = new MaterialMapperModernGl(this);
         _renderer = new SceneRendererModernGl(this, _sceneMin, _sceneMax);
     }
 }
Пример #2
0
        /// <summary>
        /// Recreates the rendering backend if needed. This is called after the
        /// global rendering backend setting is changed.
        /// </summary>
        public void RecreateRenderingBackend()
        {
            if (_renderer != null)
            {
                _renderer.Dispose();
                _renderer = null;
            }

            if (_mapper != null)
            {
                _mapper.Dispose();
                _mapper = null;
            }
            CreateRenderingBackend();
        }
Пример #3
0
 private void CreateRenderingBackend()
 {
     Debug.Assert(_renderer == null);
     if (GraphicsSettings.Default.RenderingBackend == 0)
     {
         _mapper = new MaterialMapperClassicGl(this);
         _renderer = new SceneRendererClassicGl(this, _sceneMin, _sceneMax);
     }
     else
     {
         _mapper = new MaterialMapperModernGl(this);
         _renderer = new SceneRendererModernGl(this, _sceneMin, _sceneMax);
     }
 }
Пример #4
0
        /// <summary>
        /// Recreates the rendering backend if needed. This is called after the
        /// global rendering backend setting is changed.
        /// </summary>
        public void RecreateRenderingBackend()
        {
            if(_renderer != null)
            {
                _renderer.Dispose();
                _renderer = null;
            }

            if (_mapper != null)
            {
                _mapper.Dispose();
                _mapper = null;
            }
            CreateRenderingBackend();
        }