Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] API Only #86

Open
songtianhui opened this issue Jul 22, 2024 · 4 comments
Open

[Feature Request] API Only #86

songtianhui opened this issue Jul 22, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@songtianhui
Copy link

当我在一个没有图形化的远程服务器上部署服务的时候,能否不启用图形化窗口,只提供api的调用服务。
现在程序初始化一定会需要创建GLContext,在没有图形化界面时会 Failed to create GLFW window

@songtianhui songtianhui added the enhancement New feature or request label Jul 22, 2024
@jaaronkot
Copy link
Collaborator

远程服务是否支持Opengl呢,如果支持应该可以创建成功

@songtianhui
Copy link
Author

是支持opengl的,也有显卡和驱动。当我为服务器配置了x11转发,所有程序都可以正常运行,可以在本地机看到app窗口。
但是当我关闭了x11(比如unset DISPLAY环境变量),在启动程序的时候,GLFWwindow* window = GPUPixelContext::getInstance()->GetGLContext(); 就会创建不出窗口,返回NULL,报错Failed to create GLFW window.
请问有什么解决思路吗?

@jaaronkot
Copy link
Collaborator

jaaronkot commented Jul 30, 2024

还是在x11的环境下,把 app.cc里的 glfwShowWindow 注掉试试

glfwShowWindow(window);

@jaaronkot
Copy link
Collaborator

jaaronkot commented Jul 30, 2024

另外可以在这前后加下日志,看是否创建 context的函数 提前return:

gl_context_ = glfwCreateWindow(VIEW_WIDTH, VIEW_HEIGHT, "gpupixel opengl context", NULL, NULL);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants