/// <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); }
/// <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); }
/// <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; }
/// <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; }
/// <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); }
/// <summary> /// texture's settings. /// </summary> /// <param name="parameters"></param> /// <param name="mipmapFiltering"></param> public FakeSampler(SamplerParameters parameters, MipmapFilter mipmapFiltering) : base(parameters, mipmapFiltering) { }
/// <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]); }
/// <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]); }
/// <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); }
/// <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; }
/// <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; }