<commit_before>﻿using System;

namespace CSharpGL
{
    /// <summary>
    /// A query object.
    /// <para>Occlusion Querys enable you to determine if a representative set of geometry will be visible after depth testing.</para>
    /// </summary>
    public partial class Query : IDisposable
    {
        private static OpenGL.glGenQueries glGenQueries;
        private static OpenGL.glDeleteQueries glDeleteQueries;
        private static OpenGL.glIsQuery glIsQuery;
        private static OpenGL.glBeginQuery glBeginQuery;
        private static OpenGL.glEndQuery glEndQuery;
        private static OpenGL.glGetQueryiv glGetQueryiv;
        private static OpenGL.glGetQueryObjectiv glGetQueryObjectiv;
        private static OpenGL.glGetQueryObjectuiv glGetQueryObjectuiv;
        private static OpenGL.glBeginConditionalRender glBeginConditionalRender;
        private static OpenGL.glEndConditionalRender glEndConditionalRender;

        /// <summary>
        /// texture's id/name.
        /// </summary>
        protected uint[] ids = new uint[1];

        /// <summary>
        /// texture's id/name.
        /// 纹理名（用于标识一个纹理，由OpenGL指定），可在shader中用于指定uniform sampler2D纹理变量。
        /// </summary>
        public uint Id { get { return this.ids[0]; } }

        /// <summary>
        /// Begin query.
        /// </summary>
        public void BeginQuery(QueryTarget target)
        {
            glBeginQuery((uint)target, this.Id);
        }

        // TODO: need demo!
        /// <summary>
        /// Een query.
        /// </summary>
        public void EndQuery(QueryTarget target)
        {
            glEndQuery((uint)target);
        }
        /// <summary>
        /// Begin query.
        /// </summary>
        public void BeginQuery(uint target)
        {
            glBeginQuery(target, this.Id);
        }

        // TODO: need demo!
        /// <summary>
        /// Een query.
        /// </summary>
        public void EndQuery(uint target)
        {
            glEndQuery(target);
        }

        // TODO: need demo!
        /// <summary>
        /// Begin conditional rendering.
        /// </summary>
        public void Begin(ConditionalRenderMode mode)
        {
            glBeginQuery((uint)QueryTarget.SamplesPassed, this.Id);
            glBeginConditionalRender(this.Id, (uint)mode);
        }

        /// <summary>
        /// Begin conditional rendering.
        /// </summary>
        public void Begin(uint mode)
        {
            glBeginQuery((uint)QueryTarget.SamplesPassed, this.Id);
            glBeginConditionalRender(this.Id, mode);
        }

        /// <summary>
        /// End conditional rendering.
        /// </summary>
        public void End()
        {
            glEndConditionalRender();
            glEndQuery((uint)QueryTarget.SamplesPassed);
        }

        private bool initialized = false;

        /// <summary>
        /// resources(bitmap etc.) can be disposed  after this initialization.
        /// </summary>
        public void Initialize()<commit_msg>query<commit_after>﻿using System;

namespace CSharpGL
{
    /// <summary>
    /// A query object.
    /// <para>Occlusion Querys enable you to determine if a representative set of geometry will be visible after depth testing.</para>
    /// <para>Conditional rendering is for a single object that takes a lot of rendering resources. That means you only want to render it if it is absolutely necessary.</para>
    /// </summary>
    public partial class Query : IDisposable
    {
        private static OpenGL.glGenQueries glGenQueries;
        private static OpenGL.glDeleteQueries glDeleteQueries;
        private static OpenGL.glIsQuery glIsQuery;
        private static OpenGL.glBeginQuery glBeginQuery;
        private static OpenGL.glEndQuery glEndQuery;
        private static OpenGL.glGetQueryiv glGetQueryiv;
        private static OpenGL.glGetQueryObjectiv glGetQueryObjectiv;
        private static OpenGL.glGetQueryObjectuiv glGetQueryObjectuiv;
        private static OpenGL.glBeginConditionalRender glBeginConditionalRender;
        private static OpenGL.glEndConditionalRender glEndConditionalRender;

        /// <summary>
        /// texture's id/name.
        /// </summary>
        protected uint[] ids = new uint[1];

        /// <summary>
        /// texture's id/name.
        /// 纹理名（用于标识一个纹理，由OpenGL指定），可在shader中用于指定uniform sampler2D纹理变量。
        /// </summary>
        public uint Id { get { return this.ids[0]; } }

        /// <summary>
        /// Begin query.
        /// </summary>
        public void BeginQuery(QueryTarget target)
        {
            glBeginQuery((uint)target, this.Id);
        }

        // TODO: need demo!
        /// <summary>
        /// Een query.
        /// </summary>
        public void EndQuery(QueryTarget target)
        {
            glEndQuery((uint)target);
        }
        /// <summary>
        /// Begin query.
        /// </summary>
        public void BeginQuery(uint target)
        {
            glBeginQuery(target, this.Id);
        }

        // TODO: need demo!
        /// <summary>
        /// Een query.
        /// </summary>
        public void EndQuery(uint target)
        {
            glEndQuery(target);
        }

        // TODO: need demo!
        /// <summary>
        /// Begin conditional rendering.
        /// </summary>
        public void BeginConditionalRender(ConditionalRenderMode mode)
        {
            glBeginConditionalRender(this.Id, (uint)mode);
        }

        /// <summary>
        /// Begin conditional rendering.
        /// </summary>
        public void BeginConditionalRender(uint mode)
        {
            glBeginConditionalRender(this.Id, mode);
        }

        /// <summary>
        /// End conditional rendering.
        /// </summary>
        public void EndConditionalRender()
        {
            glEndConditionalRender();
        }

        private bool initialized = false;

        /// <summary>
        /// resources(bitmap etc.) can be disposed  after this initialization.
        /// </summary>
        public void Initialize()
{'fraction_non_alphanumeric': 0.10671031096563012, 'fraction_numerical': 0.0009819967266775777, 'mean_word_length': 1.7391304347826086, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '248528', 'n_tokens_mistral': 1652, 'n_tokens_neox': 1612, 'n_words': 407}