Question

I have a small problem that disturbs me after compiling with Emscripten an OpenGL / GLUT code. I can compile with gcc and emcc. I just have a warning about-nostdinc + + Maios under different codes (this has never been a problem for me) Code compiled with gcc works fine. But the generated html page displays only a black square. The code is generated but nothing appears

Do you have any idea why?

Was it helpful?

Solution

According to https://github.com/kripken/emscripten/wiki/OpenGL-support the support is stable for features that are directly available in WebGL and OpenGL-ES-2. Legacy, fixed function pipeline OpenGL code is not yet fully supported.

I suggest you rewrite your program to follow modern OpenGL principles, i.e. don't use built in matrices, use generic vertex attributes, vertex buffer objects, use shaders (vertex and fragment); within the featureset providede OpenGL-ES-2.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top