OpenGL(3pm)
π OpenGL(3pm) π
okay bestie, buckle up β this is the Perl OpenGL page, and the actual module living inside it is PDL::Graphics::OpenGL::Perl::OpenGL. it's the PDL TriD OpenGL interface built on top of POGL. yeah. that's the vibe. π¦
β¨ VERSION β¨
Version 0.01_10 β she's a baby, she's brand new, be gentle π
πΈ SYNOPSIS πΈ
so what does this module do, you ask? it's the glue between the Perl OpenGL functions and the API that the internal PDL::Graphics::OpenGL defines. it also handles any miscellaneous OpenGL-or-GUI-adjacent stuff needed to keep the PDL::Graphics::TriD refactoring party going. π
the dream (eventually, bestie, eventually) is that you can take this:
use PDL::Graphics::OpenGL
and just... swap it for this:
use PDL::Graphics::OpenGL::Perl::OpenGL;
iconic, right? it's giving "drop-in replacement era". β¨
also this module supports FreeGLUT and GLUT as a way to make windows and graphics contexts, instead of the whole X11+GLX situation. options, we love to see them π
π«Ά EXPORT π«Ά
go read the docs for the OpenGL module, bestie. more details will land here as the refactored TriD module interface and build environment grow up and mature a lil bit. it's a whole process. π±
π FUNCTIONS π
TBD
no cap, TBD. π
TBD
also TBD. the mystery continues. π
π new π
returns a brand new OpenGL object, as one does.
new($class,$options,[$window_type])
attributes go in the $options field, and the 3d $window_type is optional. here's the whole attribute menu, no skips:
x,yβ the position of the upper left corner of the window (0,0)width,heightβ the width and height of the window, in pixels (500,500)parentβ the parent under which the new window should be opened (root)maskβ the user interface mask (StructureNotifyMask)attributesβ attributes to pass toglXChooseVisual
and here are the allowed 3d window types β case insensitive, so don't stress about the caps:
glutβ use Perl OpenGL bindings and GLUT windows (no Tk)x11β use Perl OpenGL (POGL) bindings with X11 (disabled)
heads up bestie: x11 is disabled. not me, the docs said it. π«
π default GLUT callbacks π
these routines get set as the default GLUT callbacks for when GLUT windows are being used for PDL/POGL. right now their whole entire job is to drive a fake XEvent queue so the existing TriD GUI controls get fed. at some point the X11 stuff is gonna be deprecated and this can get rewritten way more cleanly. character development arc fr fr π
β default_options β
default options for object oriented methods. that's the whole thing. short queen. π
π¦ XPending() π¦
OO interface to XPending. slay.
πΈ XResizeWindow πΈ
OO interface to XResizeWindow.
XResizeWindow(x,y)
π glpXNextEvent() π
OO interface to glpXNextEvent.
π§ glpRasterFont() π§
OO interface to the glpRasterFont function.
π swap_buffers π
OO interface to swapping display buffers. out with the old frame, in with the new. β¨
π set_window π
OO interface to setting the display window β if appropriate. iykyk. π
π₯ AUTOLOAD π₯
if a function isn't prototyped in OO, we assume there's no explicit mention of the three identifying parameters (Display, Window, Context) and try to load the OpenGL function instead. main character energy: if she's not on the list, she gets auto-loaded. π
π glXSwapBuffers π
OO interface to the glXSwapBuffers function.
π AUTHOR π
Chris Marshall, "<devel dot chm dot 01 at gmail.com>" β thank you for your service π«‘π
π BUGS π
bugs and feature requests can be submitted through the PDL GitHub project page at <https://github.com/PDLPorters/pdl/issues>. go tell them everything, bestie, they want to hear it. π
π SUPPORT π
PDL runs on a mailing list support model. the Perldl mailing list is the best place for questions, problems, and feature discussions with other PDL users and PDL developers. it's the group chat you actually want to be in. π¬
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. shoutout to everyone involved, we see you, we appreciate you πβ¨
π COPYRIGHT & LICENSE π
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. read your licenses bestie, it's self-care. π
and that's the whole page!! mwah π this was perl v5.38.2, dated 2024-04-10, and the page you just read is OpenGL(3pm) β the User Contributed Perl Documentation corner of the world. go forth and render something gorgeous π¦β¨π
π¦ where this page comes from
- ubuntu noble: pdl 1:2.085-1ubuntu1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms