简体   繁体   English

由IIS 7启动时glfwInit失败

[英]glfwInit fails when launch by IIS 7

I am making an app that create image from 3d scene. 我正在制作一个可以从3d场景创建图像的应用程序。 I use GLFW and GLEW library. 我使用GLFW和GLEW库。 I want to call this app since web service. 由于网络服务,我想调用此应用程序。

My app run well when I launch it with the .exe file but when it is launch by IIS7. 当我使用.exe文件启动应用程序时,但由IIS7启动时,我的应用程序运行良好。 it crash when glCreateShader is called and it seem that glfwInit fails. 调用glCreateShader时崩溃,并且glfwInit似乎失败。

I put the .dll path in environment variable. 我将.dll路径放在环境变量中。

any idea ? 任何想法 ?

The OpenGL implementations you can usually find on a computer assume a GPU to be available. 通常在计算机上可以找到的OpenGL实现假定GPU可用。 In general network services, like web servers, are run in an environment configuration that doesn't give access to a GPU. 通常,网络服务(例如Web服务器)在无法访问GPU的环境配置中运行。 Hence OpenGL is not available for that either. 因此OpenGL也不可用。

Furthermore often for security reasons, all API functions that deal with UI elements (like Window and Device Context) creation are disabled as well. 此外,通常出于安全原因,所有处理UI元素(例如Window和Device Context)的API函数也会被禁用。

Update: 更新:

You could drop using GLFW and use OSMesa to create a pure offscreen, windowless OpenGL context, which rasterizes using a CPU-only implementation. 您可以删除使用GLFW,然后使用OSMesa创建纯屏幕外,无窗口的OpenGL上下文,该上下文使用仅CPU的实现进行栅格化。 OSMesa has to be custom built and liked into your program, and when doing so it will not be able to fall back (effortlessly) to a GPU accelerated OpenGL implementation. OSMesa必须自定义构建并喜欢入您的程序,这样做时,它不能(毫不费力地)退回到GPU加速的OpenGL实现中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM