Commit Graph

50 Commits

Author SHA1 Message Date
rdb 8f73f95e79 display: make PStats clear collectors per-window 2018-11-19 20:02:38 +01:00
Sam Edwards 7790f8429d general: Fully qualify header references into the std namespace
Closes #341
2018-06-07 10:35:12 +02:00
Sam Edwards e2b4353800 general: Replace NULL (and 0 as pointer) with C++11 nullptr
Exceptions to this replacement are:
- .c files
- Headers included by a .c file
- stb_image.h
- dr_flac.h
- Strings
- Comments
2018-06-03 16:35:13 -06:00
rdb 2e20a0f16e Implement awaitable thread-safe future for async operations
This introduces AsyncFuture as a new base class of AsyncTask.  It's modelled after asyncio's Future class, except that it is thread-safe and you can use result() to block the current thread waiting for the future to finish (of course this is not necessary for use with coroutines).

AsyncFuture should be used for any operation that finishes in the future, to get the benefit of awaitability within coroutines as well as a standard interface for querying status and results of the operation as well as cancelling it.  As such, it's been implemented in various places, including texture.prepare() and win.trigger_copy().

Note that AsyncFuture is intended to be used *once*; it cannot be used more than once.  As an example of how this works, tex.prepare() will return the same future as long as the prepare isn't complete, but when it is done, subsequent calls to tex.prepare() will return a new future.
2017-12-04 22:25:28 +01:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb f1ea25bfb1 Unexpose BoundingVolume::around, add GraphicsOutput::get_fb_size 2015-04-25 17:13:35 +02:00
rdb b24adbcad1 Fix issues resizing OpenGL FBOs. Use LVecBase2i for storing buffer size. 2014-09-16 14:51:13 +00:00
rdb d792c93026 Overhaul stereo FBOs in Panda making it more reliable, fix MRT bugs, disable auto-GLSL profile choosing on AMD, add max_color_targets (not yet implemented) 2014-04-04 08:45:49 +00:00
David Rose f615e0beeb fix some stereo-fbo and cube map issues, introducing DisplayRegion::set_target_tex_page() 2013-12-06 23:45:40 +00:00
David Rose b7a51b133e GraphicsOutput::set_swap_eyes(), PfmFile::set_flat_texcoord_name() 2012-02-07 19:16:27 +00:00
David Rose 6f5fd1525d GraphicsWindow::_unexposed_draw 2012-01-15 20:13:16 +00:00
David Rose 38a73900f1 protect against zero-sized windows 2012-01-15 17:56:49 +00:00
David Rose 501470169f stdfloat_double 2011-10-10 05:25:10 +00:00
David Rose 3e89b7a4e8 fix parasite buffer clear problem 2011-10-06 21:39:19 +00:00
David Rose e91fb0d53e better implementation of set_one_shot() 2011-10-04 18:05:08 +00:00
David Rose bee4cb326a pipeline GraphicsOutput::set_active() to better support offscreen rendering in threaded mode 2011-10-03 20:23:17 +00:00
rdb cdcd003ec3 Add a get_screenshot returning a Texture 2011-05-01 09:14:18 +00:00
David Rose 9124513b82 side-by-side stereo 2010-07-19 18:43:24 +00:00
David Rose 7d2d35c024 clarify set_one_shot 2009-03-17 18:40:10 +00:00
David Rose 7af1350e4e pass GraphicsEngine through to constructors 2009-02-25 23:04:45 +00:00
David Rose cd48a64f86 StereoDisplayRegion 2009-02-20 20:55:15 +00:00
David Rose fb9c56432a we are now using the modified BSD license 2008-05-28 18:37:20 +00:00
David Rose 0e87f046c5 set_pixel_zoom 2008-05-08 22:38:07 +00:00
David Rose 5393b55fac fix render order of offscreen buffers 2007-09-25 17:09:01 +00:00
David Rose 21de5d551f make functions const 2007-09-24 21:35:22 +00:00
David Rose cbdb7e76b1 fix blue flash, fix offscreen buffer leakage 2007-03-05 22:07:16 +00:00
David Rose 4a369a0536 per-displayregion tracking of cull, draw times 2006-04-28 00:05:43 +00:00
Josh Yelon 6d0692fec6 *** empty log message *** 2006-04-05 16:47:19 +00:00
Josh Yelon a8ffec28b6 Changes moving FrameBufferProperties into GraphicsOutput 2006-03-23 18:17:27 +00:00
Dave Schuyler 85d75121c4 image comment 2006-03-21 01:39:32 +00:00
David Rose 90902c5cca move red-blue-stereo support lower; cache cull results between left and right stereo channels 2006-02-17 17:36:04 +00:00
David Rose 264fc31115 automatic stereo cameras for stereo windows 2006-02-16 06:17:51 +00:00
Josh Yelon cee838c08e begin_frame refactor 2006-02-08 17:52:29 +00:00
Josh Yelon 4477cdbafb First step in refactoring begin_frame and end_frame 2006-02-03 21:18:42 +00:00
Josh Yelon efc2a9ce26 *** empty log message *** 2005-10-27 21:11:26 +00:00
Josh Yelon 2c09657017 Added RTM_triggered_copy_texture 2005-10-18 20:16:39 +00:00
David Rose bda902a6d6 add make_screenshot_filename() 2005-10-03 14:34:05 +00:00
David Rose 5856cda6de better support for render-to-texture: keep buffers around until texture is gone too 2005-03-11 19:33:53 +00:00
David Rose cfeff1fe32 fix flattenMultitex() twice in one frame 2005-03-02 00:35:10 +00:00
David Rose 48e09cda31 support GraphicsOutput::set_inverted() 2004-12-07 04:25:38 +00:00
David Rose fa592c1040 remove GraphicsChannel and GraphicsLayer 2004-12-06 19:35:05 +00:00
David Rose 5761ae9d2c first pass at MultitexReducer 2004-12-03 00:01:02 +00:00
David Rose cf6a95c0ed fix problem with remove_window() removing too many windows 2004-03-03 14:15:19 +00:00
David Rose 587de59ae8 add GraphicsEngine::open_windows(), GLGraphicsStateGuardian::_edge_clamp 2004-03-03 01:09:38 +00:00
David Rose a39aa8f71c add GraphicsOutput::flip_ready 2004-03-02 20:11:51 +00:00
David Rose cb66e630d6 properly support single-buffered framebuffers 2004-02-19 19:41:52 +00:00
David Rose c26166c9cc add GraphicsOutput::sort 2004-02-19 02:53:23 +00:00
David Rose 761c0e78fc add name to GraphicsWindow constructor; add fixed_size to WindowProperties, add show-buffers to Configrc 2004-02-18 22:30:54 +00:00
David Rose 843c0331ae update license, change remaining local #includes to use quotation marks 2004-02-13 19:27:33 +00:00
David Rose 26da9be3e7 define GraphicsOutput class 2004-02-06 23:41:00 +00:00