当前位置: 首页>>代码示例>>C#>>正文


C# TextureTarget类代码示例

本文整理汇总了C#中TextureTarget的典型用法代码示例。如果您正苦于以下问题:C# TextureTarget类的具体用法?C# TextureTarget怎么用?C# TextureTarget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TextureTarget类属于命名空间,在下文中一共展示了TextureTarget类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Texture

        public Texture( TextureTarget target )
        {
            TextureTarget = target;

            myID = -1;
            myLoaded = false;
        }
开发者ID:vashage,项目名称:MarsMiner,代码行数:7,代码来源:Texture.cs

示例2: Bind

 public static void Bind(int textureUnit, TextureTarget target, uint textureID)
 {
     GL.ActiveTexture(TextureUnit.Texture0 + textureUnit);
     if (BindedTextures[textureUnit] == textureID) return; // on jo bindattu
     BindedTextures[textureUnit] = textureID;
     GL.BindTexture(target, textureID);
 }
开发者ID:bosoni,项目名称:csat,代码行数:7,代码来源:Texture.cs

示例3: Upload

 public void Upload(TextureTarget target, Region2D region)
 {
     GL.TexImage3D(target, 0, InternalFormat,
                     Size.Width, Size.Height, Depth,
                     0, Format, Type,
                     IntPtr.Zero);
 }
开发者ID:Grimston,项目名称:ezterrain,代码行数:7,代码来源:TexImageArray.cs

示例4: TextureBase

        protected TextureBase(TextureTarget target)
        {
            Target = target;
            Name = GL.GenTexture();

            Utilities.CheckGL();
        }
开发者ID:hach-que,项目名称:SLSharp,代码行数:7,代码来源:TextureBase.cs

示例5: Build1DMipmapLevel

 Int32 Build1DMipmapLevel(TextureTarget target, Int32 internalFormat, Int32 width, PixelFormat format, PixelType type, Int32 level, Int32 @base, Int32 max, IntPtr data)
 {
     unsafe
     {
         return Delegates.gluBuild1DMipmapLevels((TextureTarget)target, (Int32)internalFormat, (Int32)width, (PixelFormat)format, (PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data);
     }
 }
开发者ID:dakahler,项目名称:alloclave,代码行数:7,代码来源:Glu.cs

示例6: Build1DMipmap

 Int32 Build1DMipmap(TextureTarget target, Int32 internalFormat, Int32 width, PixelFormat format, PixelType type, IntPtr data)
 {
     unsafe
     {
         return Delegates.gluBuild1DMipmaps((TextureTarget)target, (Int32)internalFormat, (Int32)width, (PixelFormat)format, (PixelType)type, (IntPtr)data);
     }
 }
开发者ID:dakahler,项目名称:alloclave,代码行数:7,代码来源:Glu.cs

示例7: Activate

 internal void Activate(TextureTarget target, bool useMipmaps = false)
 {
   switch (this.Filter)
   {
     case TextureFilter.Linear:
       GL.TexParameter(target, TextureParameterName.TextureMinFilter, useMipmaps ? 9987 : 9729);
       GL.TexParameter(target, TextureParameterName.TextureMagFilter, 9729);
       break;
     case TextureFilter.Point:
       GL.TexParameter(target, TextureParameterName.TextureMinFilter, useMipmaps ? 9984 : 9728);
       GL.TexParameter(target, TextureParameterName.TextureMagFilter, 9728);
       break;
     case TextureFilter.Anisotropic:
       GL.TexParameter(target, TextureParameterName.TextureMinFilter, useMipmaps ? 9987 : 9729);
       GL.TexParameter(target, TextureParameterName.TextureMagFilter, 9729);
       break;
     case TextureFilter.MinLinearMagPointMipLinear:
       GL.TexParameter(target, TextureParameterName.TextureMinFilter, useMipmaps ? 9987 : 9729);
       GL.TexParameter(target, TextureParameterName.TextureMagFilter, 9728);
       break;
     default:
       throw new NotImplementedException();
   }
   GL.TexParameter(target, TextureParameterName.TextureWrapS, this.GetWrapMode(this.AddressU));
   GL.TexParameter(target, TextureParameterName.TextureWrapT, this.GetWrapMode(this.AddressV));
 }
开发者ID:tanis2000,项目名称:FEZ,代码行数:26,代码来源:SamplerState.cs

示例8: GLTexture

 public GLTexture(int id, int width, int height, PixelFormatDescriptor pixelFormat, TextureTarget dimension)
 {
     Id = id;
     Width = width;
     Height = height;
     PixelFormat = pixelFormat;
     Dimension = dimension;
 }
开发者ID:kidaa,项目名称:Pulse,代码行数:8,代码来源:GLTexture.cs

示例9: Initialize

 /// <summary>
 ///
 /// </summary>
 public void Initialize(uint unit, TextureTarget target)
 {
     if (!this.initialized)
     {
         this.DoInitialize(unit, target);
         this.initialized = true;
     }
 }
开发者ID:bitzhuwei,项目名称:CSharpGL,代码行数:11,代码来源:Sampler.cs

示例10: TextureBase

		protected TextureBase(TextureTarget target)
		{
			// set texture target
			mTextureTarget = target;

			// generate texture id
			GL.GenTextures (1, out mTextureId);
		}
开发者ID:rajorshi,项目名称:playscript-mono,代码行数:8,代码来源:TextureBase.cs

示例11: Texture

 public Texture(int id, int width, int height, TextureTarget target, PixelInternalFormat format)
 {
     Width = width;
     Height = height;
     ID = id;
     TextureTarget = target;
     PixelInternalFormat = format;
 }
开发者ID:Lazzu,项目名称:Hatzap,代码行数:8,代码来源:Texture.cs

示例12: TexImage2D

 public static unsafe void TexImage2D( TextureTarget target, int level, int internalformat, int width, int height, int border, PixelFormat format, byte[] pixels )
 {
     fixed (byte *pix = &pixels[0])
     {
         OpenGLNative.TexImage2D( target, level, internalformat, width, height, border, format, PixelType.UnsignedByte,
                                  pix );
     }
 }
开发者ID:werwolfby,项目名称:Managed-OpenGL,代码行数:8,代码来源:OpenGL.cs

示例13: SwitchFace

        public void SwitchFace(TextureTarget face)
        {
            if(!Generated)
                Generate();
            GL.FramebufferTexture2D(FramebufferTarget.Framebuffer, FramebufferAttachment.ColorAttachment0, face, TexColor, 0);

            GL.DrawBuffer(DrawBufferMode.ColorAttachment0);
        }
开发者ID:whztt07,项目名称:vengine,代码行数:8,代码来源:CubeMapFramebuffer.cs

示例14: Texture

 /// <summary>
 /// Texture.
 /// </summary>
 /// <param name="target"></param>
 /// <param name="imageBuilder"></param>
 /// <param name="parameters"></param>
 /// <param name="mipmapFiltering"></param>
 public Texture(
     TextureTarget target,
     ImageFiller imageBuilder,
     SamplerParameters parameters,
     MipmapFilter mipmapFiltering = MipmapFilter.LinearMipmapLinear)
     : this(target, imageBuilder, new FakeSampler(parameters, mipmapFiltering))
 {
 }
开发者ID:bitzhuwei,项目名称:CSharpGL,代码行数:15,代码来源:Texture.ctors.cs

示例15: SwitchCamera

 public void SwitchCamera(TextureTarget face)
 {
     if(!Generated)
         Generate();
     var proj = FacesCameras[face].GetProjectionMatrix();
     FacesCameras[face].Transformation.SetPosition(Transformation.GetPosition());
     FacesCameras[face].SetProjectionMatrix(proj);
     Camera.Current = FacesCameras[face];
 }
开发者ID:whztt07,项目名称:vengine,代码行数:9,代码来源:CubeMapFramebuffer.cs


注:本文中的TextureTarget类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。