i have a pretty simple opengl program that uses sdl. When built with emscripten none of the gl calls are recognized and throw errors. When i looked through the generated javascript file i found that the GL component of the var SDL is initialized to false and that it is not set anywhere else. If i changed the GL component to true, things seems to work fine, i get items on my screen though there is no color (which is probably another problem).
i set up the sdl videomode like so in the cpp code: SDL_Init(SDL_INIT_EVERYTHING); SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_BUFFER_SIZE, 32); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_SetVideoMode(width, height, 0, SDL_OPENGL | SDL_FULLSCREEN); (i have error checking but thats not relevant to my question) my question would be: are other people having this problem? or did i forget something? i tried building with the different options for opengl but none of them have changed this -- 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.
