|
|
| Utilities | Arrays | Imaging | Shaders | POGL | GLUT | OpenGL | GLU |
OpenGL::Image (OGI) objects provide optimized interfaces to imaging modules,
such as PerlMagick.
OGI's use OpenGL::Array (OGA) objects as wrappers around image buffers.
These buffers are are stored as typed C arrays, and allows sharing image data
between imaging libraries and the GPU.
This facilitates loading/modifying/saving textures, FBOs and VBOs - and allows
both OpenGL and the imaging libraries to access/modify the same buffers.
The result is
performance comparable to C
and significantly faster than other OpenGL language bindings.
Returns a hashref of available imaging engines. The hash keys are engine names;
hash values are their version.
Tests whether a particular engine (and optionally minimum version) is available.
Create an OGI and load it with an image (engine defaults to the 'Targa' driver if not specified).
Determine if image dimensions are powers of 2.
Return largest power of 2 dimension that fits within image's boundary.
returns a C pointer to the image buffer.
Instantiate an OGI; get GL info.
Read pixels from GPU to image buffer, then sync the buffer. Unless the image
needs to be paged into cache, is generally a NOP.
Get the imaging lib's native handle to process the image.
Write the pixels back to the GPU.
This interface assumes RGBA and that all values are normalized to 1.0;
is generally a NOP.
Allows OGA operations on an image buffer.
- 1 if has alpha channel, -1 if has inverted alpha channel; 0 if none
- number of pixel components
- 1 if big endian; otherwise 0
- 1 bit set if cache scanlines are top to bottom; others reserved
- bytes per component
- source image, if defined
version of the engine
- width of image in pixels
- height of image in pixels
- number of pixels
- cache size in bytes
- internal GL pixel format. eg: GL_RGBA8, GL_RGBA16
- GL pixel format. eg: GL_RGBA, GL_BGRA
- GL data type. eg: GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT
|
|
|
|
|
|