glpRasterFont version for glut missing
Perl bindings to the Modern OpenGL API
Brought to you by:
marshallch,
mohawk111
When using glut instead of x11 backend and trying to do:
my $win = PDL::Graphics::TriD::get_current_window();
$lb = $win->glpRasterFont("8x16",0,255); # should be name, base, number, X11::Display*
OpenGL::glpPrintString($lb, "hello");
Then it crashes on glpRasterFont because display is not set.
I suggest to allow an unset display or something and then do something like this in the glut case:
sub glpRasterFont:
Or maybe pass the window_type explicitly?
This could also be worked around in pdl instead.
Thank you for the report!
Please could I ask you to open an issue on https://github.com/Perl-GPU/pogl/issues and close this?
A pull-request to fix it would be extremely welcome, of course. And PDL's TriD interface is now an independent CPAN release, with its repo at https://github.com/PDLPorters/PDL-Graphics-TriD if you wanted to instead open an issue there.
I think the ideal solution is to both have OpenGL not crash on that input, and maybe do the right thing, and if TriD needs to change its ways, to change that also.
As of 2.102, PDL::Graphics::TriD no longer uses the
glpRasterFontfunctionality;gl_textscalls into a vendored version of GLUT's Helvetica font.glpRasterFontwas always a GLX -only function.