コード例 #1
0
 public HardwarePixelBuffer(int width, int height, int depth, Axiom.Media.PixelFormat format, BufferUsage usage,
                            bool useSystemMemory, bool useShadowBuffer)
     : base(usage, useSystemMemory, useShadowBuffer)
 {
     this.width  = width;
     this.height = height;
     this.depth  = depth;
     this.format = format;
     // Default
     this.rowPitch   = width;
     this.slicePitch = height * width;
     sizeInBytes     = height * width * PixelUtil.GetNumElemBytes(format);
 }
コード例 #2
0
        public override bool IsHardwareFilteringSupported(Graphics.TextureType ttype, Media.PixelFormat format, Graphics.TextureUsage usage, bool preciseFormatOnly)
        {
            if (format == PixelFormat.Unknown)
            {
                return(false);
            }

            //Check native format
            PixelFormat nativeFormat = this.GetNativeFormat(ttype, format, usage);

            if (preciseFormatOnly && format != nativeFormat)
            {
                return(false);
            }

            //Assume non-floaitng point is supported always
            if (!PixelUtil.IsFloatingPoint(nativeFormat))
            {
                return(true);
            }

            return(false);
        }
コード例 #3
0
		public HardwarePixelBuffer( int width, int height, int depth, Axiom.Media.PixelFormat format, BufferUsage usage,
		                            bool useSystemMemory, bool useShadowBuffer )
			: base( usage, useSystemMemory, useShadowBuffer )
		{
			this.width = width;
			this.height = height;
			this.depth = depth;
			this.format = format;
			// Default
			this.rowPitch = width;
			this.slicePitch = height*width;
			sizeInBytes = height*width*PixelUtil.GetNumElemBytes( format );
		}
コード例 #4
0
		public GLES2HardwarePixelBuffer( int width, int height, int depth, PixelFormat format, BufferUsage usage )
			: base( width, height, depth, format, usage, false, false )
		{
			this.Buffer = new PixelBox( width, height, depth, format );
			this.GlInternalFormat = Glenum.None;
		}
コード例 #5
0
 public GLES2HardwarePixelBuffer(int width, int height, int depth, PixelFormat format, BufferUsage usage)
     : base(width, height, depth, format, usage, false, false)
 {
     this.Buffer           = new PixelBox(width, height, depth, format);
     this.GlInternalFormat = Glenum.None;
 }