Perl OpenGL
From Wikipedia, the free encyclopedia
Perl OpenGL | |
![]() A screenshot illustrating FBO and Vertex/Fragment program extensions via POGL |
|
Developer: | Stan Melax, Kenneth Albanowski, Ilya Zakharevich, Bob Free |
---|---|
Latest release: | 0.55 / March 15, 2007 |
OS: | Cross-platform |
Use: | 3D computer graphics software (library/API) |
License: | Perl Artistic and GPL licenses |
Website: | graphcomp.com/opengl |
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.
Contents |
[edit] Comparison With Other Language Bindings
[edit] 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 shader|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 (and possibly self-modifying), 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.
[edit] Perl vs Java
When using Perl via Apache mod_perl or ActivePerl ISAPI, Perl consistently outperforms Java.
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 Image::Magick) for loading/saving data arrays (textures).
As of this writing, the Java OpenGL (JOGL) binding does not support Framebuffers and other advanced GPGPU extensions.
[edit] Perl vs Python / Ruby
As of this writing, Python and Ruby OpenGL bindings do not support Framebuffers and other advanced GPGPU extensions.
Due to syntax similarities, Perl is more portable to/from C than Python or Ruby.
[edit] Sample Renderings
[edit] Status and Standardization
The latest CPAN release is 0.54
The latest POGL 0.55 release candidate (March 15, 2007) provides full access to the OpenGL 2.0 specification, plus a number of extensions:
- GL_ARB_depth_texture
- GL_ARB_draw_buffers
- GL_ARB_fragment_program
- GL_ARB_fragment_program_shadow
- GL_ARB_half_float_pixel
- GL_ARB_pixel_buffer_object
- GL_ARB_point_sprite
- GL_ARB_shadow
- GL_ARB_texture_border_clamp
- GL_ARB_texture_cube_map
- GL_ARB_texture_env_add
- GL_ARB_texture_float
- GL_ARB_texture_mirrored_repeat
- GL_ARB_texture_non_power_of_two
- GL_ARB_texture_rectangle
- GL_ARB_vertex_program
- GL_ATI_texture_float
- GL_ATI_texture_mirror_once
- GL_EXT_abgr
- GL_EXT_bgra
- GL_EXT_blend_color
- GL_EXT_blend_subtract
- GL_EXT_framebuffer_object
- GL_EXT_packed_pixels
- GL_EXT_pixel_buffer_object
- GL_EXT_rescale_normal
- GL_EXT_separate_specular_color
- GL_EXT_shadow_funcs
- GL_EXT_stencil_wrap
- GL_EXT_texture_3D
- GL_EXT_texture_env_combine
- GL_EXT_texture_env_dot3
- GL_EXT_texture_filter_anisotropic
- GL_EXT_texture_lod_bias
- GL_EXT_texture_mirror_clamp
- GL_EXT_vertex_array
- GL_HP_occlusion_test
- GL_IBM_rasterpos_clip
- GL_NV_blend_square
- GL_NV_copy_depth_to_color
- GL_NV_depth_clamp
- GL_NV_fog_distance
- GL_NV_fragment_program2
- GL_NV_fragment_program_option
- GL_NV_light_max_exponent
- GL_NV_packed_depth_stencil
- GL_NV_texgen_reflection
- GL_NV_texture_expand_normal
- GL_NV_texture_rectangle
- GL_NV_vertex_program2_option
- GL_NV_vertex_program3
- GL_S3_s3tc
- GL_SGIS_generate_mipmap
- GL_SGIS_texture_lod
- GL_SGIX_depth_texture
- GL_SGIX_shadow
- GL_SUN_slice_accum
This release was implemented by Bob Free and release by Graphcomp. It has been tested on Windows (NT/XP/Vista), and Linux (Fedora 6 and Ubuntu/Dapper).