@@ -684,7 +684,7 @@ void PApplet::smooth(int level) {
684684 smoothLevel = level;
685685#ifndef __EMSCRIPTEN__
686686 glEnable (GL_LINE_SMOOTH );glHint (GL_LINE_SMOOTH_HINT ,GL_NICEST );
687- glEnable ( GL_POINT_SMOOTH ); glHint ( GL_POINT_SMOOTH_HINT , GL_NICEST );
687+ // GL_POINT_SMOOTH removed in OpenGL 3.2+ core -- skip to avoid crash
688688 glEnable (GL_MULTISAMPLE );
689689#endif
690690}
@@ -3436,21 +3436,35 @@ void PApplet::run(){
34363436#ifdef _WIN32
34373437 MessageBoxA (NULL , " After GL enable calls" , " Debug3" , MB_OK );
34383438#endif
3439- smooth ();
34403439#ifdef _WIN32
3441- MessageBoxA (NULL , " After smooth() " , " Debug4 " , MB_OK );
3440+ MessageBoxA (NULL , " Before getFramebufferSize " , " Debug4x " , MB_OK );
34423441#endif
34433442 // Don't call setProjection here -- let size() in this->setup() do it
34443443 // with the correct dimensions. Calling it now with winWidth=640,winHeight=480
34453444 // (defaults) would set the wrong ortho before this->setup() changes the size.
34463445 {int fw,fh;glfwGetFramebufferSize (gWindow ,&fw,&fh);pixelWidth=fw;pixelHeight=fh;fbW=fw>0 ?fw:logicalW;fbH=fh>0 ?fh:logicalH;}
3446+ #ifdef _WIN32
3447+ MessageBoxA (NULL , " After getFramebufferSize" , " Debug4y" , MB_OK );
3448+ #endif
34473449
34483450 // Enable sticky keys/buttons: GLFW will keep state as PRESSED until polled,
34493451 // Clear both buffers once at startup so the sketch starts with
34503452 // a known clean state (no GPU garbage in either buffer).
3451- glClearColor (0 .8f ,0 .8f ,0 .8f ,1 ); // Java Processing default grey
3453+ #ifdef _WIN32
3454+ MessageBoxA (NULL , " Before glClearColor" , " Debug4a" , MB_OK );
3455+ #endif
3456+ glClearColor (0 .8f ,0 .8f ,0 .8f ,1 );
3457+ #ifdef _WIN32
3458+ MessageBoxA (NULL , " Before first glClear" , " Debug4b" , MB_OK );
3459+ #endif
34523460 glClear (GL_COLOR_BUFFER_BIT |GL_DEPTH_BUFFER_BIT );
3461+ #ifdef _WIN32
3462+ MessageBoxA (NULL , " Before glfwSwapBuffers" , " Debug4c" , MB_OK );
3463+ #endif
34533464 glfwSwapBuffers (gWindow );
3465+ #ifdef _WIN32
3466+ MessageBoxA (NULL , " Before second glClear" , " Debug4d" , MB_OK );
3467+ #endif
34543468 glClear (GL_COLOR_BUFFER_BIT |GL_DEPTH_BUFFER_BIT );
34553469
34563470 // preventing missed inputs on Windows where events can arrive between polls.
0 commit comments