From 2d83a11742426ed80c0e2142cda239dbcdfd2922 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 26 Apr 2016 06:07:53 +0000 Subject: Make one version of Fl_OpenGL_Display_Device::capture_gl_rectangle() the default one. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11698 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx') diff --git a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx index 505efd17d..72fdcd64e 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx @@ -16,11 +16,9 @@ // http://www.fltk.org/str.php // -#include #include "../../config_lib.h" #include #include -#include #include #include @@ -42,7 +40,7 @@ Fl_OpenGL_Display_Device::Fl_OpenGL_Display_Device(Fl_OpenGL_Graphics_Driver *gr #ifdef FL_CFG_GFX_QUARTZ // convert BGRA to RGB and also exchange top and bottom -uchar *convert_BGRA_to_RGB(uchar *baseAddress, int w, int h, int mByteWidth) +static uchar *convert_BGRA_to_RGB(uchar *baseAddress, int w, int h, int mByteWidth) { uchar *newimg = new uchar[3*w*h]; uchar *to = newimg; @@ -89,7 +87,12 @@ Fl_RGB_Image* Fl_OpenGL_Display_Device::capture_gl_rectangle(Fl_Gl_Window* glw, img->alloc_array = 1; return img; } -#elif defined(FL_CFG_GFX_GDI) || defined(FL_CFG_GFX_XLIB) + +#else + +#if defined(FL_PORTING) +# pragma message "FL_PORTING: check whether the default Fl_OpenGL_Display_Device::capture_gl_rectangle() works for your platform" +#endif Fl_RGB_Image* Fl_OpenGL_Display_Device::capture_gl_rectangle(Fl_Gl_Window *glw, int x, int y, int w, int h) /* captures a rectangle of a Fl_Gl_Window window, and returns it as a RGB image @@ -127,14 +130,6 @@ Fl_RGB_Image* Fl_OpenGL_Display_Device::capture_gl_rectangle(Fl_Gl_Window *glw, return img; } -#elif defined(FL_PORTING) - -# pragma message "FL_PORTING: implement Fl_OpenGL_Display_Device::capture_gl_rectangle() for your platform" -Fl_RGB_Image* Fl_OpenGL_Display_Device::capture_gl_rectangle(Fl_Gl_Window* glw, int x, int y, int w, int h) -{ - return NULL; -} - #endif // // End of "$Id$". -- cgit v1.2.3