OpenGL(3pm)

πŸ“¦
version 2.085 Β· 4 versions
, in ubuntu noble

πŸ’– 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 to glXChooseVisual

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 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