Looks the same as https://github.com/kripken/emscripten/issues/3558 ? Yes, it seems that we are missing a callback there. I'll comment more in the bug.
On Sun, Jul 12, 2015 at 1:13 AM, XPlatform <[email protected]> wrote: > Hi, > > > I'm using GLFW3 to setup a gl context and window events. > > > I believe when the canvas resizes (i.e. to go fullscreen or otherwise due > to the webpage window being resized), then the callback registered using > glfwSetWindowSizeCallback should get called. > > > I've tested this, but I don't seem to be seeing the callback being called. > I've attached code which will reproduce the issue and have compiled with > these flags: -std=c++11 -s USE_GLFW=3 > using the following code: > > > #include<stdio.h> > #include<stdlib.h> > #include<emscripten/emscripten.h> > #define GLFW_INCLUDE_ES2 > #include<GLFW/glfw3.h> > > int windowWidth; > int windowHeight; > > void window_size_callback(GLFWwindow* window, int width, int height) > { > printf("window_size_callback received width: %i, height: %i\n", width, > height); > } > > void do_frame(){ > } > > int main(int argc, char **argv) { > GLFWwindow *window; > > if (glfwInit()!=GL_TRUE) { > printf("glfwInit() failed\n"); > glfwTerminate(); > } else { > printf("glfwInit() success\n"); > window = glfwCreateWindow(640, 480, "GLFW test", NULL, NULL); > if (!window){ > printf("glfwCreateWindow() failed\n"); > glfwTerminate(); > } else { > printf("glfwCreateWindow() success\n"); > glfwMakeContextCurrent(window); > glfwGetFramebufferSize(window, &windowWidth, &windowHeight); > glfwSetWindowSizeCallback(window, window_size_callback); > emscripten_set_main_loop(do_frame, 0, 1); > glClearColor(0.0f, 0.0f, 0.0f, 1.0f); > } > } > > glfwTerminate(); > return EXIT_SUCCESS; > } > > > > Any ideas why this might be, or workarounds I could use? Would be much > appreciated! Cheers! > > -- > 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.
