Пример #1
0
        int m_push_depth; // check push/pop errors

        #endregion Fields

        #region Constructors

        /// <summary>
        /// </summary>
        /// <param name="gl">Needed for its matrix stack.</param>
        /// <param name="draw_helpers">Needed only for debug draw (DebugDraw).</param>
        public Camera3D( GraphicsContextAlpha gl, DrawHelpers draw_helpers )
        {
            GL = gl;
            m_draw_helpers = draw_helpers;

            m_push_depth = 0;

            Frustum = new Frustum();
        }
Пример #2
0
        /// <summary>Director constructor.</summary>
        Director( uint sprites_capacity, uint draw_helpers_capacity, Sce.PlayStation.Core.Graphics.GraphicsContext context )
        {
            m_paused = false;
            m_frame_timer = new Timer();
            m_run_with_scene_called = false;
            m_elapsed = 0.0;

            GL = new GraphicsContextAlpha( context );
            DrawHelpers = new DrawHelpers( GL, draw_helpers_capacity );
            SpriteRenderer = new SpriteRenderer( GL, 6 * sprites_capacity );
            //DebugFlags |= GameEngine2D.DebugFlags.Log;

            m_canceled_replace_scene = new HashSet< Scene >();
        }
Пример #3
0
        /// <summary>
        /// </summary>
        /// <param name="gl">Needed for the matrix stack</param>
        /// <param name="draw_helpers">Needed only for debug draw</param>
        public Camera2D( GraphicsContextAlpha gl, DrawHelpers draw_helpers )
        {
            GL = gl;
            m_draw_helpers = draw_helpers;

            m_data.m_support_scale = 1.0f;
            m_data.m_support_unit_vec = Math._01;
            m_data.m_support_is_y = true;
            m_data.m_center = GameEngine2D.Base.Math._00;
            m_data.m_aspect = 1.0f;
            m_data.m_znear = -1.0f;
            m_data.m_zfar = 1.0f;

            m_push_depth = 0;

            m_prev_touch_state = false;
            m_touch_state = false;
            m_drag_mode = 0;
            m_drag_start_pos = GameEngine2D.Base.Math._00;
        }