aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2020-03-16Cleanup: Add missing includesDavid Robillard1-0/+2
2020-03-16Add timer eventsDavid Robillard2-0/+160
2020-03-16Make update test more tolerantDavid Robillard1-1/+1
2020-03-15Cleanup: Fix stale commentDavid Robillard1-2/+2
2020-03-15Unify event loop functions as puglUpdate()David Robillard4-14/+137
The previous separation between polling and dispatching was a lie, especially on MacOS where it is impossible to only poll for events without dispatching anything. Providing such an API is misleading, and problematic in various other ways. So, merge them into a single puglUpdate() function which can do the right thing on all platforms. This also adds the behaviour of actually processing all events in the given time interval, which is almost always what clients actually want to do when using a positive timeout (naively doing this before caused terrible input lag).
2020-03-15Add type and flags to worldDavid Robillard2-2/+2
Unfortunately this is an API break, but there's no reasonable way to deprecate the old function and this is required for things to work correctly. The type will be used in following commits to tick the main loop and dispatch events correctly for either case.
2020-03-15Cleanup: Fix indentationDavid Robillard1-3/+3
2020-03-09Add test for redisplays posted in the event loopDavid Robillard1-0/+133
2020-03-09Add PuglEventClient and puglSendEvent()David Robillard1-0/+8
This event makes it possible to send an arbitrary event to a view, which is useful for many things. In particular, this method of communication with views will wake up the event loop, unlike hacks in applications that share data in some other way.
2020-03-09Add test for basic view creation, exposure, and destructionDavid Robillard1-0/+149
2020-03-09Add create, destroy, map, and unmap eventsDavid Robillard1-0/+8
These can be used to do things when a view is created or destroyed, in particular set up the GL context in a more controlled way. Map and unmap events are also added for when views are shown and hidden so application can react to this as well. Towards the deprecation of puglEnterContext() and puglLeaveContext(), which are prone to abuse. squash! Remove client event stuff
2020-03-08Enable double buffering by defaultDavid Robillard1-3/+3
2020-03-08Add vsync command line options to demosDavid Robillard1-2/+19
2020-03-08Move demo programs to examples directoryDavid Robillard9-4950/+0
These are not really tests, but examples or demos, which has caused some confusion in the past. So, move them, and make room for actual tests.
2020-03-08Split graphical utilities out from test_utils.hDavid Robillard5-149/+174
2020-03-08Print when unknown events are received in testsDavid Robillard1-0/+3
2020-03-08Cleanup: Fix some conversion warningsDavid Robillard1-7/+7
2020-03-07Test: Don't reuse cube vertices for backgroundDavid Robillard1-3/+10
This was pretty confusing since it looked like the parent view was drawing the cube as well, and inefficient since only a single rect needs to be drawn here.
2020-03-07Test: Fix cube rotation via mouseDavid Robillard1-2/+2
2020-03-02Strengthen ultra-strict warnings with clangDavid Robillard3-12/+15
2020-03-01Cleanup: Adjust some code to be more clang-format friendlyDavid Robillard1-0/+6
2020-03-01Cleanup: Shorten event printing codeDavid Robillard1-42/+63
2020-03-01Cleanup: Fix includesDavid Robillard1-0/+1
2020-02-18Cairo Test: Preserve clip rectangle for background fillDavid Robillard1-2/+1
2019-12-11GL3 Test: Use instancingDavid Robillard1-49/+62
2019-12-11GL3 Test: Update bindings to OpenGL 3.3David Robillard2-8/+324
2019-12-11GL3 Test: Spread out rectangles moreDavid Robillard1-7/+11
2019-12-11GL3 Test: Calculate border color on the GPUDavid Robillard1-13/+5
2019-12-11GL3 Test: Move shaders to separate filesDavid Robillard1-43/+33
2019-12-09Fix use of incorrect union elementDavid Robillard1-4/+4
2019-11-21Rename "backend" headersDavid Robillard4-4/+4
Working on Vulkan clarified what has always been slightly smelly about the design and organization here: not everything that is API specific is really in a "backend" (a PuglBackend). The concrete example is puglGetProcAddress(), which only makes sense for GL and is actually implemented in the "backend" files. Arguably puglGetContext() is also such a thing. So, rename the headers so they can be the place where API-specific things go in general, which happens to include a backend most of the time. The stub is a bit of an exception to this, but whatever. The includes look tidier this way. In place of the old headers are compatibility stubs that just emit a warning and include the new version, which will be maintained for a while.
2019-11-18Cleanup: Remove unnecessary includesDavid Robillard3-5/+0
2019-11-18Add test utility function for logging errorsDavid Robillard5-16/+23
2019-11-18Add error checking option to test programsDavid Robillard3-1/+8
2019-11-09Fix various clang-tidy warningsDavid Robillard1-1/+3
2019-11-09Make pugl_gl3_test deterministicDavid Robillard1-16/+15
2019-11-09Add puglStrerror() and improve test program error reportingDavid Robillard3-8/+15
2019-11-03Remove redisplay flag and add puglPostRedisplayRect()David Robillard1-5/+28
2019-11-03Add pugl_print_events test programDavid Robillard1-0/+83
2019-11-03Add verbose option to test programs to print all eventsDavid Robillard3-13/+49
2019-11-03Fix duplicate word in error messageDavid Robillard1-1/+1
2019-10-21Don't use compatible profile in pugl_gl3_testDavid Robillard1-1/+1
It turns out that there are some systems where having this on makes things not work, because compatible profiles are only supported up to earlier versions, despite a much higher version being available.
2019-09-07Add clipboard supportDavid Robillard1-3/+11
2019-09-07Add OpenGL 3 test programDavid Robillard6-0/+3791
2019-09-03Make event handler return a statusDavid Robillard2-3/+9
Currently unused, but this is to leave open the possibility of event propagation or better errror handling.
2019-09-03Factor out parsing test optionsDavid Robillard3-60/+82
2019-09-03Rename remaining init functionsDavid Robillard2-15/+15
This finishes the removal of the init/set split. While these ones are superficial, the general idea here is to provide general functions that work before or after window creation where possible. This prevents the situation where ever more dynamic counterparts to existing init functions get added over time.
2019-09-03Add puglSetClassName()David Robillard2-3/+3
2019-09-03Replace size and aspect ratio init functions with dynamic onesDavid Robillard2-3/+3
2019-09-03Add swap interval hintDavid Robillard1-0/+2