diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index be8927db..e7a03797 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -50,11 +50,6 @@ set_target_properties(${GUI_ONLY_BINARIES} ${CONSOLE_BINARIES} PROPERTIES C_STANDARD 99 FOLDER "GLFW3/Examples") -if (GLFW_USE_OSMESA) - find_package(OSMesa REQUIRED) - target_compile_definitions(offscreen PRIVATE USE_NATIVE_OSMESA) -endif() - if (MSVC) # Tell MSVC to use main instead of WinMain set_target_properties(${GUI_ONLY_BINARIES} PROPERTIES diff --git a/examples/offscreen.c b/examples/offscreen.c index b7cd2fd7..e2852860 100644 --- a/examples/offscreen.c +++ b/examples/offscreen.c @@ -28,11 +28,6 @@ #define GLFW_INCLUDE_NONE #include -#if USE_NATIVE_OSMESA - #define GLFW_EXPOSE_NATIVE_OSMESA - #include -#endif - #include "linmath.h" #include @@ -151,12 +146,8 @@ int main(void) glDrawArrays(GL_TRIANGLES, 0, 3); glFinish(); -#if USE_NATIVE_OSMESA - glfwGetOSMesaColorBuffer(window, &width, &height, NULL, (void**) &buffer); -#else buffer = calloc(4, width * height); glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer); -#endif // Write image Y-flipped because OpenGL stbi_write_png("offscreen.png", @@ -164,11 +155,7 @@ int main(void) buffer + (width * 4 * (height - 1)), -width * 4); -#if USE_NATIVE_OSMESA - // Here is where there's nothing -#else free(buffer); -#endif glfwDestroyWindow(window);