Search code examples
c++node.jsserver-side-renderingopengl-4

Can we run the openGL project from server using node.js child process?


I have been trying to automate the launching of OpenGL Project from server using node.js

The problem is like whenever new client join in (create a window in browser) I want to launch the .exe file.

.exe file is an OpenGL Project which renders different shapes using openGL and then send’s rendered data to the browser to display Shape on canvas.

I am currently using child process to launch the exe whenever new client join in, but the thing is I am not able to render data in openGL Context whenever I launch exe (OpenGL Project) through the child process of node.js (though I am able to render if I launch exe without child process i.e. Manually).

Here I am not able to conclude things like,

Is it even possible to run an openGL Project from node.js child Process, will there be any openGL limitation specifically for node.js ?

Is there any other way to launch the .exe when new browser window is created ?


Solution

  • Yes we can definitely run the openGL standalone application/project from node server using node's child process.

    The mistake in my application was, directory of the shader program was not relative with the child process directory.