private void Draw(EditorWindow caller, float listElementWidth)
        {
            var    drawPos = new Rect(0, 0, listElementWidth, EditorGUI.kSingleLineHeight);
            bool   usingScriptableRenderPipeline = (GraphicsSettings.renderPipelineAsset != null);
            string lastSection = null;

            foreach (SceneView.CameraMode mode in SceneView.userDefinedModes.OrderBy(mode => mode.section).Concat(Styles.sBuiltinCameraModes))
            {
                // Draw separators and headers
                if (usingScriptableRenderPipeline && mode.drawMode != DrawCameraMode.UserDefined && !m_SceneView.IsCameraDrawModeEnabled(mode))
                {
                    // When using SRP, we completely hide disabled builtin modes, including headers
                    continue;
                }

                if (lastSection != mode.section)
                {
                    // Draw header for new section
                    if (lastSection != null)
                    {
                        // Don't draw separator before first section
                        DrawSeparator(ref drawPos);
                    }
                    DrawHeader(ref drawPos, EditorGUIUtility.TextContent(mode.section));
                    lastSection = mode.section;
                }

                using (new EditorGUI.DisabledScope(!m_SceneView.IsCameraDrawModeEnabled(mode)))
                {
                    DoBuiltinMode(caller, ref drawPos, mode);
                }
            }

            bool disabled = (m_SceneView.cameraMode.drawMode < DrawCameraMode.RealtimeCharting) ||
                            !IsModeEnabled(m_SceneView.cameraMode.drawMode);

            DoResolutionToggle(drawPos, disabled);
        }
        private void Draw(float listElementWidth)
        {
            var    drawPos     = new Rect(0, 0, listElementWidth, EditorGUI.kSingleLineHeight);
            string lastSection = null;

            foreach (SceneView.CameraMode mode in SceneView.userDefinedModes.OrderBy(mode => mode.section).Concat(Styles.sBuiltinCameraModes))
            {
                // Draw separators and headers
                if (mode.drawMode != DrawCameraMode.UserDefined && !m_SceneView.IsCameraDrawModeSupported(mode))
                {
                    // Hide unsupported items and headers
                    continue;
                }

                if (lastSection != mode.section)
                {
                    // Draw header for new section
                    if (lastSection != null)
                    {
                        // Don't draw separator before first section
                        DrawSeparator(ref drawPos);
                    }
                    DrawHeader(ref drawPos, EditorGUIUtility.TextContent(mode.section));
                    lastSection = mode.section;
                }

                using (new EditorGUI.DisabledScope(!m_SceneView.IsCameraDrawModeEnabled(mode)))
                {
                    DoBuiltinMode(ref drawPos, mode);
                }
            }

            bool disabled = (m_SceneView.cameraMode.drawMode < DrawCameraMode.RealtimeCharting) ||
                            !IsModeEnabled(m_SceneView.cameraMode.drawMode);

            DoResolutionToggle(drawPos, disabled);
        }