| Perl Opengl |
Article Index for Perl |
Shopping Opengl |
Website Links For Perl |
Information AboutPerl Opengl |
| CATEGORIES ABOUT PERL OPENGL | |
| perl | |
| 3d computer graphics | |
Perl OpenGL ('''POGL''') is a portable, compiled wrapper Library that allows OpenGL to be used in the Perl Programming Language . POGL provides support for most OpenGL 2.0 extensions, abstracts OS-specific proc handlers, and supports GLUT , a simple cross-platform windowing interface. POGL provides additional Perl-friendly APIs for passing/returning strings and arrays. PLATFORM SUPPORT
Confirmed with
INTEROPERABILITY ImageMagick - Image Loading/Modification/Saving The POGL team has collaborated with the ImageMagick team to add PerlMagick APIs that allow GPUs and ImageMagick to share cache buffers via C pointers - optimizing performance for FBOs and VBOs - for use with loading/saving textures and GPGPU data transfer. These APIs have been added to ImageMagick 6.3.5:
Benchmarks demonstrate GetImagePixels is 188x faster than ImageToBlob or GetPixels. FFmpeg - Video Frame Textures CPAN's FFmpeg module may be used in conjunction with POGL and the above Image::Magick APIs to map video to OpenGL textures. PERFORMANCE POGL provides OpenGL performance comparable to that of C, and consistently outperforms other Perl Bindings like SDL::OpenGL and other language bindings like Python.
COMPARISON WITH OTHER LANGUAGE BINDINGS Perl vs C General Purpose GPU ( GPGPU ) processing is one area in which Perl compares with compiled languages in terms of performance. GPU benchmarks show no significant performance differences between C and Perl (via POGL), when rendering a realtime 3D animated object with dynamically generated texturemaps. GPGPU Vertex Shaders can execute complex c-like code on large arrays of data, rarely touching the CPU. The CPU is left doing event handling, system calls, disk I/O and UI - which contributes a minor portion of the overall processing time. The performance difference between C and Perl becomes statistically insignificant. In the case where GPU vertex shader code is being dynamically generated, Perl's optimized, interpretive string handling can provide better performance than C. Since GPU performance depends on tight integration with an OS' windowing system (WGL/X11/etc), OpenGL APIs (particularly GPGPU extensions) are OS-dependent. POGL abstracts these dependencies, allowing portable code.
Perl vs Java When using Perl for online service via Apache Mod_perl or ActivePerl ISAPI , Perl consistently outperforms Java - see benchmarks {Link without Title} . In addition, Perl tends to rely on more binary modules than Java, providing additional performance benefits. POGL is a compiled module, and is used in conjunction with compiled imaging modules (such as ImageMagick ) for loading/saving data arrays ( Textures ). As of this writing, the Java OpenGL ( JOGL ) binding does not support Framebuffer s and other advanced GPGPU extensions. Perl vs Python / Ruby As of this writing, Python and Ruby OpenGL bindings do not support Framebuffers and other advanced GPGPU extensions.
OPENGL OBJECTS POGL provides specialized objects that dramatically enhance Perl performance. POGL objects store data as typed C arrays, and pass data between APIs using C pointers - eliminating the need to copy/convert/cast when passing data between interfaces. The result is maximized performance, with the added flexibility/portability of Perl. OpenGL::Array (OGA) OGAs store OpenGL data as typed C arrays. OGAs may be populated by C pointer, Perl packed arrays (strings) or Perl arrays. OGAs may be bound/mapped to VBOs to share data between the GPU and Perl. Accessor methods provide a means to get/set array elements by C pointer, packed arrays or Perl arrays. Documentation can be found on POGL's Developer Site OpenGL::Image (OGI) OGIs use OGAs to wrap image buffers from various imaging libraries. OGI simplifies loading/modifying/saving OpenGL textures, FBOs and VBOs. OGI provides an extensible plug-in architecture to support new imaging libraries: OGI supports ImageMagick (v6.3.5 or newer), and by default Targa (uncompressed RGBA files). OGI provides direct C pointer access to ImageMagick's image cache, resulting in dramatic performance in transferring images/data between the GPU and IM. Documentation can be found on POGL's Developer Site OGI is available on CPAN as a separate OpenGL-Image module {Link without Title} . OpenGL::Shader (OGS) The OSG module abstracts OpenGL APIs for ARB (assembly), Cg and GLSL shading languages. Documentation can be found on POGL's Developer Site OGS is available on CPAN as a separate OpenGL-Shader module {Link without Title} . SAMPLE RENDERINGS |
|
|