dll - OpenTK 错误,无法加载 DLL 'libGLES.dll

标签 dll opentk

所以我刚刚开始使用 OpenTK,并将此代码放在一个继承 GameWindow 类的类中:

protected override void OnRenderFrame(FrameEventArgs e)
{
    base.OnRenderFrame(e);
    int val = (int)ClearBufferMask.ColorBufferBit;
    GL.Clear(val);
    this.SwapBuffers();
}

在调用GL.Clear(val)时,出现以下异常:

An unhandled exception of type 'System.DllNotFoundException' occurred in OpenTK.dll
Additional information: Unable to load DLL 'libGLES.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

我使用 nuget 插件管理器安装了 OpenTK,作为尝试解决此错误的措施,我下载了安装程序 ( http://sourceforge.net/projects/opentk/files/latest/download ) 并尝试通过它进行安装。

明天我会继续尝试查找问题,如果没有人指点,我希望能够添加互联网知识、问答风格。

最佳答案

我使用 ctrl + 自动添加了引用。 vs中的命令,并没有费心去检查添加的命名空间。

添加的命名空间使用的是OpenTK.Graphics.ES10; (嵌入式标准),我想使用 OpenTK.Graphics.OpenGL;

切换此引用解决了问题。

关于dll - OpenTK 错误,无法加载 DLL 'libGLES.dll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34458043/

相关文章:

c# - 实例着色器的矩阵设置

linux - Wine 升级到版本 1.4.1 后 DLL 文件丢失

c - R包卸载的时候一定要卸载动态库吗?

c++ - 将 C++ 应用程序链接到 dll

c++ - Delphi 动态 DLL 调用中的奇怪行为

c# - OpenTK 模板缓冲区

c# - opentk 的实用程序库

c++ - 如何使用 ASM 将 FARPROC 的内存地址移动到另一个函数?

c# - 多重采样 FBO 忽略深度测试

c# - 仅在 C# 中的特定时间触发事件