PDL::G...riD::GL(3pm)

πŸ“¦
version 2.102 Β· 3 versions
, in debian trixie, ubuntu questing

✨ PDL::G...riD::GL ✨

okay bestie, so this is PDL::Graphics::TriD::GL β€” yes the name is literally abbreviated with dots in the middle, that's just how the manpage header rolls, don't question it πŸ’… β€” from the User Contributed Perl Documentation collection, and it's about to be your new fave little glue module, no cap.


🌈 NAME 🌈

PDL::Graphics::TriD::GL β€” the PDL TriD OpenGL interface, using POGL πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

So basically this module is the glue, the social secretary, the group chat admin between the Perl OpenGL functions and the API that the internal PDL::Graphics::OpenGL defines. It's the one making introductions. 🫢

It also handles any miscellaneous OpenGL or GUI-adjacent functionality needed to support the PDL::Graphics::TriD refactoring. Iconic behaviour honestly.

It defines an interface that subclasses are expected to conform to, implementing support for GLFW, GLUT, X11+GLX, etc. β€” as the mechanism for creating windows and graphics contexts. It's giving "choose your own adventure" but make it windows. πŸ‘‘


✨ CONFIG ✨

Defaults to using OpenGL::GLFW β€” you can override that by setting the environment variable POGL_WINDOW_TYPE to glut, x11, or the default is glfw. (so like, glut or x11 if you're feeling spicy, glfw if you're not πŸ“)

This is implemented by PDL::Graphics::TriD::Window::gdriver.


🌸 new 🌸

Returns a new OpenGL object. Baby's first OpenGL object, so cute.

new($class,$options,[$window_type])

Attributes are specified in the $options field; the 3d $window_type is optional (yes the original says "optionsl", we're all doing our best here 😭). The attributes are:

  • x,y β€” the position of the upper left corner of the window (default 0,0)
  • width,height β€” the width and height of the window in pixels (default 500,500)
  • parent β€” the parent under which the new window should be opened (default root)
  • mask β€” the user interface mask (default StructureNotifyMask)
  • attributes β€” attributes to pass to glXChooseVisual

Allowed 3d window types, case insensitive, are:

  • glfw β€” use Perl OpenGL bindings and GLFW windows (no Tk)
  • glut β€” use Perl OpenGL bindings and GLUT windows (no Tk)
  • x11 β€” use Perl OpenGL (POGL) bindings with X11
not me listing every single one because every single one matters πŸ’€ no skipping, bestie

πŸŽ€ default_options πŸŽ€

default options for object oriented methods. lowkey self-explanatory, highkey important.


πŸ¦‹ swap_buffers πŸ¦‹

OO interface to swapping frame buffers. the frame buffers get swapped, the vibes stay immaculate ✨


πŸ’œ set_window πŸ’œ

OO interface to setting the display window (if appropriate). note the "if appropriate" β€” it's conditional, it's mysterious, it's main character energy 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Chris Marshall, <devel dot chm dot 01 at gmail.com>. we stan. 🫢


πŸ’€ BUGS πŸ’€

Bugs and feature requests may be submitted through the PDL GitHub project page at <https://github.com/PDLPorters/pdl/issues> . go yell there, kindly, they're listening πŸ™ˆ


🧚 SUPPORT 🧚

PDL uses a mailing list support model. The Perldl mailing list is the best for questions, problems, and feature discussions with other PDL users and PDL developers. it's giving community, it's giving support group, it's giving friendship πŸ’–

To subscribe see the page at <http://pdl.perl.org/?page=mailing-lists>


⭐ ACKNOWLEDGEMENTS ⭐

TBD including PDL TriD developers and POGL developers...thanks to all. (the TBD is doing a lot of heavy lifting here but we appreciate everyone regardless 🌸)


Copyright 2009 Chris Marshall.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See <http://dev.perl.org/licenses/> for more information.


and that's the whole page, bestie ✨ this was served up by perl v5.40.1 on 2025-04-11, and honestly? the way it ate. πŸ’…πŸ¦‹πŸ’–

πŸ“¦ where this page comes from