public TextureGL AttachTexture( FramebufferAttachment attachment, PixelFormat format, PixelInternalFormat internalFormat ) { TextureGL texture = new TextureGL(viewport.Width, viewport.Height, format, internalFormat); textures[attachment] = texture; AttachTextureLevel(attachment, 0); return(texture); }
public TextureGL AttachTextureArray( FramebufferAttachment attachment, PixelFormat format, PixelInternalFormat internalFormat, int layerCount ) { TextureGL texture = new TextureGL(viewport.Width, viewport.Height, format, internalFormat, layerCount); textures[attachment] = texture; AttachTextureLayer(attachment, 0, 0); return(texture); }
public int CompareTo(object o) { TextureGL other = (TextureGL)o; if ( (textureObject == other.textureObject) && (BindTarget == other.BindTarget) ) { return(0); } return(-1); }
public TextureGL AttachCubeTexture( FramebufferAttachment attachment, PixelFormat format, PixelInternalFormat internalFormat ) { if (viewport.Width != viewport.Height) { throw new System.InvalidOperationException(); } TextureGL texture = new TextureGL(viewport.Width, format, internalFormat); textures[attachment] = texture; AttachCubeFace(attachment, TextureTarget.TextureCubeMapNegativeX, 0); return(texture); }
public void AttachCubeFace( FramebufferAttachment attachment, TextureTarget face, int level ) { textures[attachment].Apply(); GL.BindFramebuffer(FramebufferTarget.Framebuffer, framebufferObject); TextureGL texture = textures[attachment]; texture.FramebufferTexture2D( FramebufferTarget.Framebuffer, attachment, face, level ); }
public void CopyFrom(IUniformValue src) { TextureGL other = (TextureGL)src; textureObject = other.textureObject; }