summaryrefslogtreecommitdiff
path: root/examples/OpenGL3test.cxx
AgeCommit message (Collapse)Author
2024-05-13CMake: improve linking OpenGL3 example programs (#959)Albrecht Schlosser
- Remove find_library(LIB_GLEW ...) from 'resources.cmake' - Use the variable FLTK_GLEW_DIR to "find" a user supplied GLEW library for OpenGL3 example programs (examples/OpenGL3*.cxx). Both static and shared libs (DLLs) are supported, but the static library is preferred to avoid DLL dependencies. - Define preprocessor macro 'GLEW_STATIC' by CMake compile definitions if and only if the static glew library (glew32s) was found and linked. The previous code defined 'GLEW_STATIC' unconditionally in the source code which led to undefined references if a shared lib (DLL) was used.
2024-05-05Fix Visual Studio compiler warnings, make output visible...Albrecht Schlosser
on Windows w/o a console device ("DOS"/Debug window) if OpenGL3 is not available.
2022-12-30Use `FL_OVERRIDE` for all overridden virtual methods (#611)Matthias Melcher
FL_OVERRIDE is defined as `override` for C++11 and higher FL_OVERRIDE is defined as `override` for VisualC 2015 and newer Don't interfere with Fl_Widget::override()
2022-11-01Fix trailing whitespaceAlbrecht Schlosser
2022-10-06Fix use of several FLTK widgets above an GL scene.ManoloFLTK
The code failed with 2 or more widgets when FLTK would trigger partial redraws of the widgets, unless the Fl_Gl_Window was FL_DAMAGE_ALL. This commit also adds a second FLTK widget to example/OpenGL3test to check this multiple widget situation, and fixes an error where operator ! was used instead of ~ .
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-28macOS: support of FLTK widgets in OpenGL 3 windows - cont'd.ManoloFLTK
This code is OK under macOS 10 9 and 13.
2022-09-27Simpler code to support FLTK widgets in macOS OpenGL 3 windows.ManoloFLTK
Also, the application-level code to add widgets to a GL3 window becomes platform-independent.
2022-09-26Replace all calls to sprintf() by calls to snprintf().ManoloFLTK
2022-09-25Add cross-platform support for adding widgets to an OpenGL3-based Fl_Gl_Window.ManoloFLTK
Under non-macOS platforms, the key is to call glUseProgram(0); after having used OpenGL 3 which allows to then use OpenGL 1 and draw FLTK widgets over the OpenGL3 scene. Under macOS, this is impossible because macOS GL3 contexts are not compatible with GL1. The solution implemented here is to create an additional Fl_Gl_Window placed above and sized as the GL3-based window, to give it a non opaque, GL1-based context, and to put the FLTK widgets in that additional window.
2022-09-22Wayland: fix error detection during call to glewInit().ManoloFLTK
2022-03-04Add the Wayland platform to FLTK 1.4ManoloFLTK
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-04-04Update procedure for OpenGL3 support.ManoloFLTK
2018-02-09Replace "WIN32" with "_WIN32" or "Windows".Albrecht Schlosser
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32". Replace "WIN32" in text and documentation with "Windows". Replace "MSWindows" with "Windows". To do: README.Windows.txt (and maybe other documentation as well) needs updates. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 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
2016-06-22 Make Fl_Gl_Window::pixels_per_unit() return a float (rather than int) value.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11794 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-10Added required header and footer for new source files.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10955 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-02Mac OS: support for high resolution OpenGL windows.Manolo Gouy
Methods Fl::event_x_pixel() and Fl::event_y_pixel() committed at r.10941 are removed. Instead method Fl_Gl_Window::pixels_per_unit() is added. The documentation explains in more detail how to write cross-platform FLTK code supporting high resolution OpenGL windows on retina displays. The examples/OpenGL3test.cxx app exercises Fl_Gl_Window::pixels_per_unit(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10945 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-01Mac OS: added Fl::event_x_pixel() and Fl::event_y_pixel() that return the ↵Manolo Gouy
mouse event position in pixel units that differ from FLTK units for OpenGL windows mapped to a retina display. On non Mac OS platforms, these are synonyms of Fl::event_x() and Fl::event_y(). The example/OpenGL3test demo program is modified to call these new functions. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10941 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-27Added support for OpenGL V3 and higher.Manolo Gouy
On the X11/MSWindows platforms, this requires external installation of the GLEW library. This fixes STR#3198 and STR#3257. Added two new examples programs. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10876 ea41ed52-d2ee-0310-a9c1-e6b18d33e121