You are using old legacy desktop GL <= 2.1 form of OpenGL and not the modern GL 3.0 core version of OpenGL. To emulate the old deprecated functionality, pass in the link flags "-s LEGACY_GL_EMULATION=1", that should get rid of some of the missing functions, although that emulation is not perfect so all bets are off. I think glShadeModel function might not exist in the emulation. Emscripten supports the "WebGL subset" of GLES2 and desktop OpenGL 3+ core profile, which roughly translates to "GLES2 without client-side data". Check out the WebGL specification page for more info.
2014-04-15 22:39 GMT+03:00 Cid <[email protected]>: > I have a c++ code that uses opengl to output a 3d object onto a cmd > window. The object takes its vertices and edges from a .txt file. When I > type "emcc temp/main.cpp -I torus.txt -o ex.html" into emscripten cmd box, > its gives me > > warning: unresolved symbol: glVertex3fv > warning: unresolved symbol: glShadeModel > warning: unresolved symbol: glutIgnoreKeyRepeat > warning: unresolved symbol: glEnd > warning: unresolved symbol: glColor3f > warning: unresolved symbol: glVertex3f > > Since it is a warning, I ignore it and try out the ex.html link. > Here is where the problem occurs, I get a black screen box, and the text > box at the bottom outputs -1. > > Trying to go about this another way, I include --emrun so that the code is > now: > "emcc temp/main.cpp -I torus.txt --emrun -o ex.html" > and then I put "emrun ex.html" > this gives me the same result as before but in the cmd box, it states > preload time:27ms > missing function: glutIgnoreKeyRepeat > -1 > -1 > > And yes, I do indeed have that function included in the code. > My main purpose is to create a link to where the code has been executed > and anyone can interact with the 3d object. > > Help would be greatly appreciated in answering this conundrum. > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
