Exemplo n.º 1
0
        /// <summary>
        /// Retrives a sampler parameter from named sampler
        /// </summary>
        /// <param name="Sampler">id of sampler to query.</param>
        /// <param name="pname">Name of parameter to retrive value for.</param>
        /// <returns></returns>
        public static uint GetSamplerParameterIuiv(uint Sampler, SamplerParameters pname)
        {
            uint tmp = 0;

            Delegates.glGetSamplerParameterIuiv(Sampler, pname, ref tmp);
            return(tmp);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Retrives a sampler parameter from named sampler
        /// </summary>
        /// <param name="Sampler">id of sampler to query.</param>
        /// <param name="pname">Name of parameter to retrive value for.</param>
        /// <returns></returns>
        public static float GetSamplerParameterfv(uint Sampler, SamplerParameters pname)
        {
            float tmp = 0.0f;

            Delegates.glGetSamplerParameterfv(Sampler, pname, ref tmp);
            return(tmp);
        }
Exemplo n.º 3
0
        /// <summary>
        /// texture's settings.
        /// </summary>
        /// <param name="parameters"></param>
        /// <param name="mipmapFilter"></param>
        public SamplerBase(SamplerParameters parameters, MipmapFilter mipmapFilter)
        {
            if (parameters == null)
            {
                this.parameters = new SamplerParameters();
            }
            else
            {
                this.parameters = parameters;
            }

            this.mipmapFilter = mipmapFilter;
        }
Exemplo n.º 4
0
        /// <summary>
        /// texture's settings.
        /// </summary>
        /// <param name="parameters"></param>
        /// <param name="mipmapFilter"></param>
        public SamplerBase(SamplerParameters parameters, MipmapFilter mipmapFilter)
        {
            if (parameters == null)
            {
                this.parameters = new SamplerParameters();
            }
            else
            {
                this.parameters = parameters;
            }

            this.mipmapFilter = mipmapFilter;
        }
Exemplo n.º 5
0
 /// <summary>
 /// Gets an instance of <see cref="FontTexture"/>.
 /// </summary>
 /// <param name="fontBitmap"></param>
 /// <param name="parameters"></param>
 /// <param name="mipmapFiltering"></param>
 /// <returns></returns>
 public static FontTexture GetFontTexture(this FontBitmap fontBitmap,
     SamplerParameters parameters = null,
     MipmapFilter mipmapFiltering = MipmapFilter.LinearMipmapLinear)
 {
     var texture = new Texture(
         TextureTarget.Texture2D,
         fontBitmap.GlyphBitmap,
         parameters, mipmapFiltering);
     texture.Initialize();
     var result = new FontTexture();
     result.GlyphFont = fontBitmap.GlyphFont;
     result.GlyphHeight = fontBitmap.GlyphHeight;
     result.TextureSize = fontBitmap.GlyphBitmap.Size;
     result.GlyphInfoDictionary = fontBitmap.GlyphInfoDictionary;
     result.TextureObj = texture;
     return result;
 }
Exemplo n.º 6
0
        /// <summary>
        /// Gets an instance of <see cref="FontTexture"/>.
        /// </summary>
        /// <param name="fontBitmap"></param>
        /// <param name="parameters"></param>
        /// <param name="mipmapFiltering"></param>
        /// <returns></returns>
        public static FontTexture GetFontTexture(this FontBitmap fontBitmap,
                                                 SamplerParameters parameters = null,
                                                 MipmapFilter mipmapFiltering = MipmapFilter.LinearMipmapLinear)
        {
            var texture = new Texture(
                TextureTarget.Texture2D,
                fontBitmap.GlyphBitmap,
                parameters, mipmapFiltering);

            texture.Initialize();
            var result = new FontTexture();

            result.GlyphFont           = fontBitmap.GlyphFont;
            result.GlyphHeight         = fontBitmap.GlyphHeight;
            result.TextureSize         = fontBitmap.GlyphBitmap.Size;
            result.GlyphInfoDictionary = fontBitmap.GlyphInfoDictionary;
            result.TextureObj          = texture;
            return(result);
        }
Exemplo n.º 7
0
 /// <summary>
 /// texture's settings.
 /// </summary>
 /// <param name="parameters"></param>
 /// <param name="mipmapFiltering"></param>
 public FakeSampler(SamplerParameters parameters, MipmapFilter mipmapFiltering)
     : base(parameters, mipmapFiltering)
 {
 }
Exemplo n.º 8
0
 /// <summary>
 /// Retrives a sampler parameter from named sampler
 /// </summary>
 /// <param name="Sampler">id of sampler to query.</param>
 /// <param name="pname">Name of parameter to retrive value for.</param>
 /// <param name="params"></param>
 public static void GetSamplerParameterIuiv(uint Sampler, SamplerParameters pname, uint[] @params)
 {
     Delegates.glGetSamplerParameterIuiv(Sampler, pname, ref @params[0]);
 }
Exemplo n.º 9
0
 /// <summary>
 /// Sets the parameter of a sampler object.
 /// </summary>
 /// <param name="Sampler">id of sampler to change.</param>
 /// <param name="pname">Name of parameter to set.</param>
 /// <param name="params">new values for parameter</param>
 public static void SamplerParameterfv(uint Sampler, SamplerParameters pname, float[] @params)
 {
     Delegates.glSamplerParameterfv(Sampler, pname, ref @params[0]);
 }
Exemplo n.º 10
0
 /// <summary>
 /// Sets the parameter of a sampler object.
 /// </summary>
 /// <param name="Sampler">id of sampler to change.</param>
 /// <param name="pname">Name of parameter to set.</param>
 /// <param name="param">new values for parameter</param>
 public static void SamplerParameterf(uint Sampler, SamplerParameters pname, float param)
 {
     Delegates.glSamplerParameterf(Sampler, pname, param);
 }
Exemplo n.º 11
0
 /// <summary>
 /// texture's settings.
 /// </summary>
 /// <param name="parameters"></param>
 /// <param name="mipmapFiltering"></param>
 public FakeSampler(SamplerParameters parameters, MipmapFilter mipmapFiltering)
     : base(parameters, mipmapFiltering)
 {
 }
Exemplo n.º 12
0
 /// <summary>
 /// Retrives a sampler parameter from named sampler
 /// </summary>
 /// <param name="Sampler">id of sampler to query.</param>
 /// <param name="pname">Name of parameter to retrive value for.</param>
 /// <returns></returns>
 public static uint GetSamplerParameterIuiv(uint Sampler, SamplerParameters pname)
 {
     uint tmp = 0;
     Delegates.glGetSamplerParameterIuiv(Sampler, pname, ref tmp);
     return tmp;
 }
Exemplo n.º 13
0
 /// <summary>
 /// Retrives a sampler parameter from named sampler
 /// </summary>
 /// <param name="Sampler">id of sampler to query.</param>
 /// <param name="pname">Name of parameter to retrive value for.</param>
 /// <param name="params"></param>
 public static void GetSamplerParameterIuiv(uint Sampler, SamplerParameters pname, uint[] @params)
 {
     Delegates.glGetSamplerParameterIuiv(Sampler, pname, ref @params[0]);
 }
Exemplo n.º 14
0
 /// <summary>
 /// Retrives a sampler parameter from named sampler
 /// </summary>
 /// <param name="Sampler">id of sampler to query.</param>
 /// <param name="pname">Name of parameter to retrive value for.</param>
 /// <returns></returns>
 public static float GetSamplerParameterfv(uint Sampler, SamplerParameters pname)
 {
     float tmp = 0.0f;
     Delegates.glGetSamplerParameterfv(Sampler, pname, ref tmp);
     return tmp;
 }
Exemplo n.º 15
0
 /// <summary>
 /// Sets the parameter of a sampler object.
 /// </summary>
 /// <param name="Sampler">id of sampler to change.</param>
 /// <param name="pname">Name of parameter to set.</param>
 /// <param name="params">new values for parameter</param>
 public static void SamplerParameterfv(uint Sampler, SamplerParameters pname, float[] @params)
 {
     Delegates.glSamplerParameterfv(Sampler, pname, ref @params[0]);
 }
Exemplo n.º 16
0
 /// <summary>
 /// Sets the parameter of a sampler object.
 /// </summary>
 /// <param name="Sampler">id of sampler to change.</param>
 /// <param name="pname">Name of parameter to set.</param>
 /// <param name="param">new values for parameter</param>
 public static void SamplerParameterf(uint Sampler, SamplerParameters pname, float param)
 {
     Delegates.glSamplerParameterf(Sampler, pname, param);
 }