Exemple #1
0
        public TextureGLSub(Rectangle 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.
            Debug.Assert(!GLWrapper.IsInitialized || parent != null,
                         "May not construct a subtexture without a parent texture to refer to.");

            this.bounds = bounds;
            this.parent = parent;
        }
Exemple #2
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;
        }
Exemple #3
0
 public TextureGLSub(Rectangle bounds, TextureGLSingle parent)
 {
     this.bounds = bounds;
     this.parent = parent;
 }
Exemple #4
0
 public TextureGLAtlasWhite(TextureGLSingle parent)
     : base(new RectangleI(0, 0, 1, 1), parent)
 {
 }
 public TextureGLAtlasWhite(TextureGLSingle parent)
     : base(new RectangleI(0, 0, 1, 1), parent)
 {
     Opacity = Opacity.Opaque;
 }