com.jogamp.opengl.util
Interface GLPixelBuffer.GLPixelBufferProvider

All Known Subinterfaces:
GLPixelBuffer.SingletonGLPixelBufferProvider
All Known Implementing Classes:
AWTGLPixelBuffer.AWTGLPixelBufferProvider, AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider
Enclosing class:
GLPixelBuffer

public static interface GLPixelBuffer.GLPixelBufferProvider

Allows user to interface with another toolkit to define GLPixelBuffer.GLPixelAttributes and memory buffer to produce TextureData.


Method Summary
 GLPixelBuffer allocate(GL gl, GLPixelBuffer.GLPixelAttributes pixelAttributes, int width, int height, int depth, boolean pack, int minByteSize)
          Allocates a new GLPixelBuffer object.
 GLPixelBuffer.GLPixelAttributes getAttributes(GL gl, int componentCount)
          Called first to determine GLPixelBuffer.GLPixelAttributes.
 

Method Detail

getAttributes

GLPixelBuffer.GLPixelAttributes getAttributes(GL gl,
                                              int componentCount)
Called first to determine GLPixelBuffer.GLPixelAttributes.


allocate

GLPixelBuffer allocate(GL gl,
                       GLPixelBuffer.GLPixelAttributes pixelAttributes,
                       int width,
                       int height,
                       int depth,
                       boolean pack,
                       int minByteSize)
Allocates a new GLPixelBuffer object.

Being called to gather the initial GLPixelBuffer, or a new replacement GLPixelBuffer if GLPixelBuffer.requiresNewBuffer(GL, int, int, int).

The minimum required remaining byte size equals to minByteSize, if > 0, otherwise utilize GLBuffers.sizeof(GL, int[], int, int, int, int, int, boolean) to calculate it.

Parameters:
gl - the corresponding current GL context object
pixelAttributes - the desired GLPixelBuffer.GLPixelAttributes
width - in pixels
height - in pixels
depth - in pixels
pack - true for read mode GPU -> CPU, otherwise false for write mode CPU -> GPU
minByteSize - if > 0, the pre-calculated minimum byte-size for the resulting buffer, otherwise ignore.


Copyright 2010 JogAmp Community.