문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top