Axiom.RenderSystems.OpenGL.GLPBRTTManager.RequestPBuffer C# (CSharp) Метод

RequestPBuffer() публичный Метод

Create PBuffer for a certain pixel format and size
public RequestPBuffer ( PixelComponentType pcType, int width, int height ) : void
pcType PixelComponentType
width int
height int
Результат void
		public void RequestPBuffer( PixelComponentType pcType, int width, int height )
		{
			// Check Size
			GLPBuffer pBuffer = pBuffers[ (int)pcType ].PixelBuffer;
			if ( pBuffer != null )
			{
				if ( pBuffer.Width < width || pBuffer.Height < height )
				{
					// if the current buffer is too small destroy it and recreate it
					pBuffer = null;
					pBuffers[ (int)pcType ].PixelBuffer = null;
				}
			}

			if ( pBuffer == null )
			{
				// create pixelbuffer via rendersystem
				pBuffers[ (int)pcType ].PixelBuffer = this._glSupport.CreatePBuffer( pcType, width, height );
			}
			pBuffers[ (int)pcType ].InUseCount++;
		}

Usage Example

Пример #1
0
        public GLPBRenderTexture(GLPBRTTManager manager, string name, GLSurfaceDesc target, bool writeGamma, int fsaa)
            : base(name, target, writeGamma, fsaa)
        {
            this.manager = manager;

            this.pbFormat = PixelUtil.GetComponentType(target.Buffer.Format);
            manager.RequestPBuffer(this.pbFormat, Width, Height);
        }
All Usage Examples Of Axiom.RenderSystems.OpenGL.GLPBRTTManager::RequestPBuffer