Пример #1
0
        protected ulong Get1ul(GetQueryObjectParam param)
        {
            ulong result;

            using (Context.Lock())
                GL.GetQueryObject((uint)Id, param, out result);
            return(result);
        }
Пример #2
0
        public static unsafe uint GetQueryObjectuiv(uint query, GetQueryObjectParam param)
        {
            uint[] result = new uint[1];

            fixed(uint *ptr = &result[0])
            GLCore.GetQueryObjectuiv(query, param, ptr);

            return(result[0]);
        }
Пример #3
0
 public static void GetQueryObject(int id, GetQueryObjectParam param, out int res)
 {
     if (RenderSettings.CoreQuerySupported)
     {
         GL.GetQueryObject(id, param, out res);
     }
     else
     {
         GL.Arb.GetQueryObject(id, (ArbOcclusionQuery)(int)param, out res);
     }
 }
Пример #4
0
 public static void GetQueryObject(int id, GetQueryObjectParam param, out int res)
 {
     if (RenderSettings.CoreQuerySupported)
     {
         GL.GetQueryObject(id, param, out res);
     }
     else
     {
         GL.Arb.GetQueryObject(id, (QueryObjectParameterName)param, out res);
     }
 }
Пример #5
0
 /// <summary> Get the timestamp in nanoseconds </summary>
 public long GetCounter(GetQueryObjectParam p = GetQueryObjectParam.QueryResult)
 {
     GL.GetQueryObject(Id, p, out long res);
     return(res);
 }
Пример #6
0
 /// <summary> Get the query data as an long[]. See <href>https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetQueryObject.xhtml</href></summary>
 /// <param name="length">Buffer length of query result</param>
 /// <param name="pname">Query parameter, nominally QueryResult. Also GL_QUERY_RESULT_NO_WAIT or GL_QUERY_RESULT_AVAILABLE. (use OpenTK Names)</param>
 /// <returns>long[] result</returns>
 public long[] GetQueryal(int length, GetQueryObjectParam pname = GetQueryObjectParam.QueryResult)
 {
     long[] array = new long[length];
     GL.GetQueryObject(Query.Id, pname, array);
     return(array);
 }
Пример #7
0
 /// <summary> Get the query data as an int[]. See <href>https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetQueryObject.xhtml</href></summary>
 /// <param name="length">Buffer length of query result</param>
 /// <param name="pname">Query parameter, nominally QueryResult. Also GL_QUERY_RESULT_NO_WAIT or GL_QUERY_RESULT_AVAILABLE. (use OpenTK Names)</param>
 /// <returns>int[] result</returns>
 public int[] GetQuerya(int length, GetQueryObjectParam pname = GetQueryObjectParam.QueryResult)
 {
     int[] array = new int[length];
     GL.GetQueryObject(Query.Id, pname, array);
     return(array);
 }
Пример #8
0
 /// <summary> Get the query data as an long. See <href>https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetQueryObject.xhtml</href></summary>
 /// <param name="pname">Query parameter, nominally QueryResult. Also GL_QUERY_RESULT_NO_WAIT or GL_QUERY_RESULT_AVAILABLE. (use OpenTK Names)</param>
 /// <returns>Long result</returns>
 public long GetQueryl(GetQueryObjectParam pname = GetQueryObjectParam.QueryResult)
 {
     GL.GetQueryObject(Query.Id, pname, out long res);
     return(res);
 }
Пример #9
0
 /// <summary> Get the query data as an integer.  See <href>https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetQueryObject.xhtml</href></summary>
 /// <param name="pname">Query parameter, nominally QueryResult. Also GL_QUERY_RESULT_NO_WAIT or GL_QUERY_RESULT_AVAILABLE. (use OpenTK Names)</param>
 /// <returns>Integer result</returns>
 public int GetQuery(GetQueryObjectParam pname = GetQueryObjectParam.QueryResult)
 {
     GL.GetQueryObject(Query.Id, pname, out int res);
     GLStatics.Check();
     return(res);
 }
Пример #10
0
		public static void GetQueryObjectui64v(uint id, GetQueryObjectParam pname, ulong[] parameters)
		{
			glGetQueryObjectui64v deleg = BaseGraphicsContext.Current.Loader.Get<glGetQueryObjectui64v>();
			if (deleg != null)
				deleg(id, pname, parameters);
		}