Exemplo n.º 1
0
        /// <summary> Called by render list and executes the operation </summary>
        public override void Execute(GLMatrixCalc c)
        {
            if (QueryBuffer != null)
            {
                QueryBuffer.BindQuery();
            }

            GL.BeginQueryIndexed(Target, Index, Id);
            GLStatics.Check();
        }
Exemplo n.º 2
0
 public virtual void Begin()
 {
     using (Context.Lock())
         if (Indexed)
         {
             GL.BeginQueryIndexed(Target, Index, Id);
         }
         else
         {
             GL.BeginQuery(Target, Id);
         }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Begins the given query name.
        /// </summary>
        /// <param name="mapping">The query name to begin.</param>
        /// <param name="target">The query target to capture.</param>
        public void Begin(T mapping, QueryTarget target)
        {
            var map = _queries[mapping];

            if (map.Active)
            {
                throw new QueryException(string.Format("Query already active: {0} {1}", target, mapping));
            }
            map.Active = true;
            map.Target = target;
            map.Index  = AcquireIndex(target);
            GL.BeginQueryIndexed(target, map.Index, map.Handle);
        }