summaryrefslogtreecommitdiff
path: root/src/gl_draw.cxx
AgeCommit message (Collapse)Author
45 hourswipmaxim nikonov
46 hourswipmaxim nikonov
2025-05-09Remove declaration of Fl_Scalable_Graphics_Driver from FL/Fl_Graphics_Driver.HManoloFLTK
and declare it in non-public header src/Fl_Scalable_Graphics_Driver.H which also declares classes Fl_Font_Descriptor and Fl_Fontdesc.
2024-07-12gl_draw: fix drawing of text outside of viewportCyprinus Carpio
2023-08-07Fix for Broken "cube" demo (#762)ManoloFLTK
This commit fixes an error in the cube demo appearing specifically with the AMD Radeon GPU.
2023-03-18Fix gl_rect and OGL::fl_point #688Matthias Melcher
2022-11-27macOS+OpenGL3: remove "warning: gl.h and gl3.h are both included"ManoloFLTK
2022-11-23Restore build with HAVE_GL = 1 and HAVE_GL_GLU_H = 0ManoloFLTK
2022-09-29Support of FLTK widgets in OpenGL 3 windows - cont'd.ManoloFLTK
This commit allows to switch between FL_DOUBLE / FL_SINGLE modes in widget-containing GL3 windows. Demo program examples/OpenGL3test is modified to show FLTK widgets even if the platform does not support OpenGL 3.
2022-09-13Avoid deprecated glGetString(GL_EXTENSIONS) call when possible.ManoloFLTK
2021-08-27Remove compiler warnings '-Wextra-semi' (see also PR #266)Albrecht Schlosser
I compiled with `-Wextra-semi -Werror=extra-semi` on Linux and Windows (cross-compiled on Linux) and removed all "extra semicolon" warnings I could find. I didn't check on macOS (yet). Note: Linux configured with and w/o Pango but not w/o Xft. Compilation with other options (e.g. Cairo) might still emit such warnings.
2021-05-06Fix Windows (Visual Studio) compiler warningsAlbrecht Schlosser
2021-04-27Slightly simplify gl_texture_fifo::compute_texture()ManoloFLTK
The font size is set to the value necessary for the GL scene before computing the string width. Virtual Fl_Gl_Window_Driver::effective_size() becomes unnecessary.
2021-03-21Remove unnecessary system includes from public headersAlbrecht Schlosser
Add includes of system headers in the implementation files where necessary.
2021-02-21Remove VS compilation warning messages about implicit type conversions.ManoloFLTK
2021-02-19Remove use of static global var gl_fontsize inside virtual member ↵ManoloFLTK
Fl_Gl_Window_Driver::alpha_mask_for_string()
2021-02-16Use <config.h> when appropriate.ManoloFLTK
2021-02-16Create classes Fl_XXX_Gl_Window_Driver according to driver model.ManoloFLTK
2020-10-08Fl_Xlib_Font_Descriptor does not need char glok[64] when USE_XFT is onManoloFLTK
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
2019-06-19Rename variable from txt_buf to alpha_bufManoloFLTK
2019-06-18Avoid "uninitialized memory" error in gl_drawAlbrecht Schlosser
As discussed in fltk.general, valgrind reported errors when gl_draw() is called and the text is converted to a texture (i.e. when testing whether the texture already exists). We need a length check to make sure we don't overrun text buffers. See threads "gl_draw" and "gl_draw - [General Use]", respectively, started on Jun 19, 2019.
2019-04-10Save and restore GL parameters as appropriateAlbrecht Schlosser
According to the docs "glPixelStorei sets pixel storage modes that affect the operation of subsequent glReadPixels as well as the unpacking of texture patterns (see glTexImage2D and glTexSubImage2D)." Hence we (a) must be aware that current values of these modes can be anything set by user or FLTK code before (b) should be polite and restore these modes to previous values See discussion in fltk.coredev, thread "gl_draw problem" started on Apr 05, 2019.
2018-12-29Refactored gl_remove_displaylist_fonts to be more easily readable and to ↵Matthias Melcher
stop triggering static analysis tool.
2018-11-08Add guard against gl_draw(const char*, int) called with null 2nd argument.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13117 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-28Slightly simpler implementation of ↵Manolo Gouy
Fl_Cocoa_Gl_Window_Driver::alpha_mask_for_string() - continued. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13032 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-28Slightly simpler implementation of ↵Manolo Gouy
Fl_Cocoa_Gl_Window_Driver::alpha_mask_for_string(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13031 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-26Move Fl_Gl_Window_Driver.H from FL/ to src/Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12977 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23Doxygen only: fixed all block comments starting with an asterisk to ↵Matthias Melcher
space-only, fixed doxygen keywords prepended with @ to use a backward slash instead. No code was changed. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12970 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23Removed macro FL_PORTING, as it has been more confusing than helpful.Matthias Melcher
The original intention of FL_PORTING was to mark all places in the source code where changes are required to port FLTK to a new platform. Thanks to the driver system, this approach has become somewhat misleading, so I removed all references. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23Doxygen: created Group to document drivers, disabled by defaultMatthias Melcher
Uncomment `ENABLED_SECTIONS += DriverDev` in documentation/Doxyfile.in to enable driver documentation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-07STR#3450: Draw text with OpenGL using textures on all platforms.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12650 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31Replace FL/x.H with FL/platform.H - step 2 (STR #3435).Albrecht Schlosser
This second step replaces FL/x.H with FL/platform.H in all source files. Dependencies have been adjusted as well. This commit completes the replacement of FL/x.H with FL/platform.H. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-18Fix bug when drawing text with Fl_OpenGL_Graphics_Driver and scaled GUI.Manolo Gouy
The bug appeared in test/cube where the "Text" string was mispositioned when the app was rescaled. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12597 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-01-24MacOS: reduce the memory size of class gl_texture_fifo managing GL textures ↵Manolo Gouy
to draw strings under GL. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12166 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-01-19Remove USE_OksiD_style_GL_font_selection preprocessor variable because it is ↵Manolo Gouy
equivalent to !USE_XFT git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12164 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-01-10Remove useless #include directivesManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12160 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-27 MacOS platform: fix building under OS 10.4 that may not have ↵Manolo Gouy
kCGBitmapByteOrder32Host #define'd git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11990 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-06-16Fix for STR#3316 to match the size argument of glGenLists() and ↵Manolo Gouy
glDeleteLists() calls. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11784 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-08Remove Doxygen warning.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11723 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-08Make Fl_Cocoa_Gl_Window_Driver::draw_string() simplerManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11722 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-08Fix gl_draw() used in simple window under Mac OS X.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11719 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-08Rewrite file src/gl_draw.cxx under the driver model.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11718 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-08Rewrite OpenGL-related code under the driver model.Manolo Gouy
Class Fl_Gl_Window_Driver, with its platform-specific derived classes, is created to hold platform-specific, OpenGL code. File gl_draw.cxx still needs to be converted to the driver model. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11716 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-16Fix usage of preprocessor macro USE_X11.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11635 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-02Replace src/Fl_Font.H by one file for each platform.Manolo Gouy
This file contained nearly only platform-specific code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11507 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-29Remove the platform-dependent type xcharManolo Gouy
File fl_utf8.h defines the xchar type with a platform-dependent value (wchar_t or unsigned short). But it is used exclusively by WIN32 code (0 use in cross-platform code, 0 use in APPLE or in USE_X11 code). Thus, we can just get rid of this type and replace it by wchar_t where it is used. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11459 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-19Rename Fl_Graphics_Driver::set_gc(void*) to gc(void*) and ↵Manolo Gouy
Fl_Graphics_Driver::get_gc() to gc(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11191 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-18Remove all uses of the fl_gc global variable. Towards a clean driver model.Manolo Gouy
fl_gc remains usable by the application as a hook into the system. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13Details on PORTME items. Move fl_parse_color() to screen drivers.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121