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); }
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); }
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 ); }
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; }
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; }