示例#1
0
        public TextureGLSub(RectangleI bounds, TextureGLSingle parent)
        {
            // If GLWrapper is not initialized at this point, it means we do not have OpenGL available
            // and thus will never draw anything. In this case it is fine if the parent texture is null.
            if (GLWrapper.IsInitialized && parent == null)
            {
                throw new InvalidOperationException("May not construct a subtexture without a parent texture to refer to.");
            }

            this.bounds = bounds;
            this.parent = parent;
        }
示例#2
0
 public TextureGLAtlasWhite(TextureGLSingle parent)
     : base(new RectangleI(0, 0, 1, 1), parent)
 {
 }