Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如许多教程中所述,我正在尝试在运行时使用 wglGetProcAddress 获取其他 openGL 函数,例如 glCreateShader()。然而,返回值为 NULL,并且找不到与着色器相关的函数。
如何解决这个问题?谢谢!!:-)
这些功能由图形驱动程序提供。所以你有2个选择:
请注意,有许多低端显卡根本无法满足扩展的要求,因此他们的制造商永远不会提供它们。
我已经解决了这个问题。必须首先创建 OpenGL 上下文,并且必须选择像素格式并适合您想要的扩展集。
如果您不执行上述操作,wglGetProcAddress 将找不到您的扩展。