summaryrefslogtreecommitdiff
path: root/test/cube.cxx
AgeCommit message (Collapse)Author
2024-12-04Improve timer statistics in test/cube demoAlbrecht Schlosser
These timer statistics are useful to see the interaction of OpenGL drawing and FLTK timers (Fl::add_timer + Fl::repeat_timer).
2024-12-04Fixes warning in cube.cxx.Matthias Melcher
2024-12-01Use a constant frame rate (25 fps) in test/cube demoAlbrecht Schlosser
The old version was "synchronized" by calling Fl::check() in a loop which resulted in the highest speed possible on any platform. It turned out that this was way too fast on the Wayland platform as `valerius` posted on IRC/Matrix on Nov 30, 2024. Citation: "anyone else notice the cube demo on Wayland is mega ultra hyper speed?". I took the opportunity to change the demo to use a timer with a given frame rate (see constant 'FPS') to synchronize drawing. Note: the 'speed' slider is independent of the drawing frequency. Finally this commit adds statistics output when the 'Stats / Exit' button is pressed like Iterations = 304, runtime = 12.167 sec, fps = 24.99, requested: 25 with the requested frame rate (default = 25) and allows the user to continue to see more statistics. To do (very likely not in 1.4.x): 1. integrate running statistics in the display 2. make the desired frame rate variable at runtime (new slider)
2024-05-14Fix crash in test/cube under macOS when using Quit menubar itemManoloFLTK
2023-10-20Fix ctrl/+/- in cube demoAlbrecht Schlosser
- Fl_Grid: force layout() on resize() - needed for GL subwindows - test/cube.cxx: - use end() in constructor of class cube_box - ensure not to change the current group when adding a button
2023-10-16Add Fl_Grid widget and test and demo programsAlbrecht Schlosser
- FL/Fl_Grid.H: header file - src/Fl_Grid.cxx: implementation - examples/grid-simple.cxx: simple example program - test/cube.cxx: use Fl_Grid for layout - test/grid_alignment.cxx: test cell alignment and other functions - test/grid_buttons.cxx: demo program as discussed in fltk.general - test/grid_login.cxx: like test/flex_login.cxx but with Fl_Grid - test/flex_login.cxx: modified to match test/grid_login.cxx
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-03-22Restore building when HAVE_GL is 0ManoloFLTK
2022-02-06OpenGL implementation of all `fl_` "Drawing Fast Shapes" graphics calls (#385)Matthias Melcher
* Fix build system for unites, * Updated unittest to check OpenGL drawing. Making sure that OpenGL drawing is exactly the same as native drawing to make FLTK widget rendering look the same in GL windows. * Make OpenGL optional. * Implemented clipping in OpenGL * unites drawing fast shapes * Fixed CMake * Updating unittest. Added tests for fl_pi and fl_arc (int) Renamed tab to render complex shapes. * Improved OpenGL FLTK drawing emulation. * Fixed GTK ROUND DOWN BOX * Fixing Makefile for unittest * Correctly aligning OpenGL text. * Fixed text alignment in GL windows. Explained the "FLTK over GL " example in Cube. * Overlapping test. * Better GL graphics alignment. * Drawing the focus rect. * Adding Alpha Channel support for GL. * Added FLTK-on-GL documentation.
2022-01-26Removed GL Button from test/cubeMatthias Melcher
2021-11-25Fix group nesting / end() statements in test/cube demoAlbrecht Schlosser
2021-08-31Fix more MSVC warnings in test apps (#109)Albrecht Schlosser
- test/checkers.cxx - test/cube.cxx - test/offscreen.cxx - test/unittest_simple_terminal.cxx - test/utf8.cxx
2021-02-27Remove config_lib.h and runtime configuration infoAlbrecht Schlosser
... as discussed in fltk.coredev.
2020-11-24Improve resizing of test/cube demo (#157, #166)Albrecht Schlosser
Based on Greg's mods in 'cube-v5a-patch.txt' in this issue #157 comment: https://github.com/fltk/fltk/issues/157#issuecomment-732496554 Simplify the layout and keep border widths constant: - combine left GL window + buttons (ct_group) in left group (lt_grp) - make the cube Fl_Gl_Windows the resizable()s of their respective groups. The latter keeps the margin widths constant.
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-11-08Don't use Fl::readqueue() in cube demoAlbrecht Schlosser
Usage of Fl::readqueue() is not recommended (should be deprecated?), hence we shouldn't use it in our demo program(s). To do: remove Fl::readqueue() usage from fluid.
2019-11-08Fix cube demo if OpenGL is not availableAlbrecht Schlosser
(1) Fix a compilation error (2) Fix high CPU usage
2017-08-27Associate gl_font() and gl_draw() calls.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12405 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-08Restore high resolution support.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11324 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-23Added OpenGL implementation of fl_vertex calls. Compiling and linking, but ↵Matthias Melcher
functionality untested. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-20Starting to cut out individual graphics function, so that multiple drivers ↵Matthias Melcher
can coexist (cfg_gfx). Found the missing pixels in the OpenGL gfx driver. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11012 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-17Trying to create a more detaild way to configure the library, added runtime ↵Matthias Melcher
information, added an OpenGL graphics driver that renders a button on top of an OpenGL window (see test/cube). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11006 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-20Changed OpenGL support for the Mac OS X platform: use cocoa instead of ↵Manolo Gouy
deprecated AGL. All changes are mac-specific, except a very minor change in file src/gl_draw.cxx where string drawing wrongly claimed to support @symbol, not possible because symbols are drawn using non-GL primitives. Unchanged application code can use the new FLTK code. In addition, the new code allows mac applications to draw OpenGL scenes at high resolution on so-called 'retina' displays, but this requires some support from app code. They must call, before opening GL windows, Fl::use_high_resolution(1); and change their glViewport() calls as follows glViewport(0, 0, pxel_w(), pixel_h()); This uses 2 new member functions of the Fl_Gl_Window class, pixel_w() and pixel_h() returning the window dimensions in pixel units, that is, twice the w() and h() when the window is mapped on a retina display. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10498 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19Modifications to all LGPL headers for STR #2685.Greg Ercolano
(to clarify static exception LGPL by changing license references) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-15Changed all #include "config.h" to #include <config.h>.Albrecht Schlosser
This is necessary for out-of-source builds (e.g. CMake) to work correctly. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8033 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28Fixed Copyright to 2010.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-17Fl_Printer is now enough to print this window.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7283 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-17Some fine tuning after introduction of Fl_Gl_Window-capable ↵Manolo Gouy
Fl_Printer::print_widget() git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7281 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-16Using Fl_Plugin feature to automatically draw OpenGL (sub)windows. No extra ↵Matthias Melcher
coding needs to be done. Just call Fl_Printer::print_widget(...). The Fl_Gl_Printer device can (and should) be removed or at least made inaccessible. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7280 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-15Changed menu name.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7271 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-15Make the GL printer menu in the cube demo look a little but tidier inIan MacArthur
winXP (and I hope on X11 etc.) and alos hopefully without breaking it for OSX and the Fl_Sys_Menu_Bar... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7269 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-14Merge of branch-1.3-Fl_Printer, with the following main changes:Albrecht Schlosser
(1) adding Fl_Device class (and more) for device abstraction (2) adding Fl_Pinter class (and more) for printing support. Todo: Code cleanup, update dependencies, remove/replace test print window. I'm looking into converting the test window popup in a global shortcut that would pop up the print dialog now... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7263 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01Cahngad copyrights in 'test'Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6615 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-16Doxygen documentation : took the opportunity to update copyright info as we ↵Fabien Costantini
modified already in batch almost all sources, added also a fil doxygen command to class headers to harmonize with original matt Fl_Widget dox. format. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-11-04STR #1061: fixed Fl_Window::cursor for subwindows and GL windows on WIN32Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4634 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16Update source file headers with STR web page.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16Update "clean" targets to properly handle core files, remove backup files,Michael R Sweet
etc. Add "install" target to test directory which installs the example programs. Install the config.h file in the examples directory. Make sure the example programs compile outside the FLTK source dir. Add example programs to fltk.list.in. Fix missing redraw() in x_cb() in FLUID... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4287 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24Copyright updates.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-11Copyright updates and prep for 1.1.5rc1.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-30Copyright update for 1.1.3 release (not quite yet, but soon...)Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-07-11minor changes to make FLTK compile as a DLL in CodeWarriorMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2521 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-07-11MacOS: wait(0) would not handle all pending events.Matthias Melcher
The OpenGL demos were showing a significant delay in handling UI events. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2502 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-06-26Remired CR/LF pairs :-/Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2320 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-06-26Added gl_font calls to Cube demo for gl_font implementation on MacOS (later).Matthias Melcher
Renamed variable 'todo' in preferences.fl to 'tasks' to make global search for Todo items easier. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2319 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-01-01Copyright updates...Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-03-14Replaced remaining _WIN32 symbols with WIN32Bill Spitzak
Stuff from work: Removed reference to unused GL/glu.h header file, which is missing on some Linux systems. Fl_Gl_Window has a new method to allow you to get and set the context: void Fl_Gl_Window::context(void*, int destroy = 0) void* Fl_Gl_Window::context() const; Return or set a pointer to the GLContext that this window is using. This is a system-dependent structure, but it is portable to copy the context from one window to another. You can also set it to NULL, which will force FLTK to recreate the context the next time make_current() is called, this is useful for getting around bugs in OpenGL implementations. If destroy_flag is true the context will be destroyed by fltk when the window is destroyed, or when the mode() is changed, or the next time context(x) is called. Some cleanup of Fl_Gl_Choice to move most of the system dependent #ifdefs into Fl_Gl_Choice.cxx. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1413 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-01-22Copyright 2001.Michael R Sweet
FLTK 1.0.11. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-06-13Updates for Mingw and Cygnus builds.Michael R Sweet
Added README.win32 file for WIN32-specific issues. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1209 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-06-05OK, now version 1.0.9Michael R Sweet
Updated email addresses to point to fltk.org domain... Updated README and CHANGES files accordingly. Updated makeinclude and Makefile files to put -L../lib before the LDFLAGS/GLDFLAGS to avoid problem reported by Alexander. documentation/Makefile wasn't including makeinclude. Updated FLUID about window to show version 1.0.9. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1168 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-04-25Updated copyright notices for all of the 1.0.x files.Michael R Sweet
Updated the configure script for *BSD and GCC 2.95 (-fno-exceptions) Added install rule to documentation directory. Dumped old packages directory; added traditional RPM spec file and EPM list file (that replace all of the packages stuff) The FLUID man page is now "fluid.1" for the formatted page and "fluid.man" for the non-formatted page, since only IRIX uses pack'd formatted man pages. Whew! git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121