Games::OpenGL::Font::2DGames::OpenGL::Font::2D module can load/render 2D colored bitmap fonts via OpenGL. | |
Download |
Games::OpenGL::Font::2D Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Tels
- Publisher web site:
- http://search.cpan.org/~tels/
Games::OpenGL::Font::2D Tags
Games::OpenGL::Font::2D Description
Games::OpenGL::Font::2D module can load/render 2D colored bitmap fonts via OpenGL. Games::OpenGL::Font::2D module can load/render 2D colored bitmap fonts via OpenGL.SYNOPSIS use Games::OpenGL::Font::2D; my $font = Games::OpenGL::Font::2D->new( file => 'font.bmp' ); use SDL::App::FPS; my $app = SDL::App::FPS->new( ... ); # don't forget to change these on resize events! $font->screen_width( $app->width() ); $font->screen_height( $app->width() ); $font->pre_output(); # setup rendering for font $font->color( ); # yellow as array ref $font->color( 1,0,0 ); # or red $font->alpha( 0.8 ); # nearly opaque # half-transparent, red $font->output (100,100, 'Hello OpenGL!', , 0.5 ); # using the $font's color and alpha $font->output (100,200, 'Hello OpenGL!' ); $font->transparent( 1 ); # render font background transparent $font->spacing_y( 16 ); # render vertical (costly rebuild!) $font->spacing_x( 0 ); # (costly rebuild!) $font->output (100,200, 'Hello OpenGL!' ); $font->post_output(); # if wanted, you can reset OpenGLEXPORTSExports nothing on default. Can export on demand the following: FONT_ALIGN_LEFT FONT_ALIGN_RIGHT FONT_ALIGN_CENTER FONT_ALIGN_TOP FONT_ALIGN_BOTTOM Requirements: · Perl
Games::OpenGL::Font::2D Related Software