I'm trying to create a pygame software that utilizes shaders from ModernGL. I took the code from the following tutorial on Youtube. However, when I attempt to execute the code, ModernGL raises the following error: ValueError: Requested OpenGL version 330, got version 0 I'm pretty sure that this has to do with me only installing ModernGL, without OpenGL. However, it also might be an issue with my operating system, MacOS BigSur 11.7.6, since the code in question worked in the video. Also, when attempting to install OpenGL, pip raises the following error: ERROR: Could not find a version that satisfies the requirement opengl (from versions: none) ERROR: No matching distribution found for opengl I don't know what to do, there's nothing on the ModernGL docs for that either (or I skipped it) Pretty sure I'm not duplicating this question.
import moderngl
import pygame
pygame.init()
DISPLAYSURf = pygame.display.set_mode((500,475), pygame.OPENGL | pygame.DOUBLEBUF)
ctx = moderngl.create_context() # <--(raises error)