Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: Graphics: OpenGL in Perl/Tk ... with GLUT

by haj (Priest)
on Jan 12, 2023 at 16:10 UTC ( #11149551=note: print w/replies, xml ) Need Help??

in reply to Re: Graphics: OpenGL in Perl/Tk ... with GLUT
in thread Graphics: OpenGL in Perl/Tk ... with GLUT

Thanks for this suggestion! My browser experiments so far were focused on Web3D (and the X3D format to store 3D models).

I understand that WebGL is similar to OpenGL as a low-level graphics API, targeted at the HTML5 canvas. But like with "pure" OpenGL ... it doesn't come with an event loop and GUI toolkit. That's what I use Tk for, and what I would have to rewrite for the HTML canvas.

Also, being based on OpenGL ES which is "a well-defined subset of desktop OpenGL suitable for low-power devices", it seems to lack the interactive glRenderMode feature which I need to use. Or maybe I just failed to find it?

  • Comment on Re^2: Graphics: OpenGL in Perl/Tk ... with GLUT

Replies are listed 'Best First'.
Re^3: Graphics: OpenGL in Perl/Tk ... with GLUT
by cavac (Vicar) on Jan 13, 2023 at 09:13 UTC

    JavaScript doesn't have what you would call an "event loop", it uses callbacks to react to events. As for cyclic stuff (rendering, physics, etc), you just use setInterval().

    As far as communication with the Perl backend, i make extensive use of Websockets. It really depends on your webserver setup on how you do that, but with my own webserver i use a (slightly adapted) version of Protocol::WebSocket::Frame

    PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11149551]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2023-03-27 04:45 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (63 votes). Check out past polls.