Okay, this issue has finally been solved thanks to rdb,
who pointed out that I absolutely can do OpenGL calls in a way I would have never thought of!
All it needs to do OpenGL calls, like setting flags or vertices etc, is installing a callback!
Of course pyopengl has to be installed.
from OpenGL.GL import * # PyOpenGL
from pandac.PandaModules import * # needed for the callback
def initGL(cbdata):
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE)
cbnode.clearDrawCallback()
cbnode = CallbackNode('cbnode')
cbnode.setDrawCallback(PythonCallbackObject(initGL))
cbnp = render.attachNewNode(cbnode)
You have to issue a clearDrawCallback, else initGL will get called every frame.
Unless, of course, you specifically want that to happen.