At this time there is not a publicly available OpenGL <-> Raku library, but it isn't too difficult to just call into the underlying C libraries. Here's a minimal example.
It's a little verbose since it is doing all of the setup and loading manually.
use NativeCall;class Window is repr('CPointer') {}class Monitor is repr('CPointer') {}# GLFWconstant $lib = ('glfw', v3);subglfwInit(--> int32) is native($lib) {*}subglfwCreateWindow(int32, int32, Str, Monitor, Window --> Window) is native($lib) {*}subglfwTerminate() is native($lib) {*}subglfwMakeContextCurrent(Window) is native($lib) {*}subglfwSetWindowShouldClose(Window, int32) is native($lib) {*}subglfwWindowShouldClose(Window --> int32) is native($lib) {*}subglfwSwapBuffers(Window) is native($lib) {*}subglfwSwapInterval(int32) is native($lib) {*}subglfwPollEvents() is native($lib) {*}subglfwGetFramebufferSize(Window, int32 is rw, int32 is rw) is native($lib) {*}# OpenGLenum PrimitiveMode( GL_TRIANGLES => 0x0004,);enum MatrixMode( GL_MATRIX_MODE => 0x0BA0, GL_MODELVIEW => 0x1700, GL_PROJECTION => 0x1701,);constant $gllib = 'GL';subglViewport(int32, int32, int32, int32) is native($gllib) {*}subglClear(int32) is native($gllib) {*}subglMatrixMode(int32) is native($gllib) {*}subglLoadIdentity() is native($gllib) {*}subglOrtho(num64, num64, num64, num64, num64, num64) is native($gllib) {*}subglRotatef(num32, num32, num32, num32) is native($gllib) {*}subglBegin(int32) is native($gllib) {*}subglColor3f(num32, num32, num32) is native($gllib) {*}subglVertex3f(num32, num32, num32) is native($gllib) {*}subglEnd() is native($gllib) {*}constant GL_COLOR_BUFFER_BIT = 0x00004000;die'Failed to initialize GLFW'unless glfwInit().so;my $w = glfwCreateWindow(640, 480, "OpenGL Triangle", Nil, Nil);without $w { glfwTerminate(); die'Failed to create window' }glfwMakeContextCurrent($w);glfwSwapInterval(1);whilenot glfwWindowShouldClose($w) {my num32 $ratio;my int32 $width;my int32 $height; glfwGetFramebufferSize($w, $width, $height); $ratio = ($width / $height).Num; glViewport(0, 0, $width, $height); glClear(GL_COLOR_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-$ratio, $ratio, -1e0, 1e0, 1e0, -1e0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glRotatef((now % 360 * 100e0) , 0e0, 0e0, 1e0); glBegin(GL_TRIANGLES); glColor3f(1e0, 0e0, 0e0); glVertex3f(5e-1, -2.88e-1, 0e0); glColor3f(0e0, 1e0, 0e0); glVertex3f(-5e-1, -2.88e-1, 0e0); glColor3f(0e0, 0e0, 1e0); glVertex3f( 0e0, 5.73e-1, 0e0); glEnd(); glfwSwapBuffers($w); glfwPollEvents();}glfwTerminate();