Commit Graph

157 Commits

Author SHA1 Message Date
rdb a704d2c228 display: Fix typos in docstrings
[skip ci]
2021-02-15 12:46:29 +01:00
rdb 05ed918d63 general: mark deprecated methods with the @deprecated tag
This makes them easier to find and, if necessary, automatically generate deprecation warnings for.
2019-09-08 09:50:28 +02:00
rdb 254cea63bb display: fix assertion in threaded pipeline 2018-11-22 23:13:58 +01:00
rdb d902ea5ce4 display: don't render window if all its DRs are inactive
This is an optimization, which will skip begin_frame/end_frame for a buffer that isn't going to have anything rendered to it.  Affects the RenderPipeline.
2018-11-20 00:39:44 +01:00
rdb 8f73f95e79 display: make PStats clear collectors per-window 2018-11-19 20:02:38 +01:00
rdb afc994b2fb display: fix crash when removing DisplayRegion in pipelined render
Maybe not a perfect solution; we should consider keeping the DisplayRegions around until they have gone through the entire pipeline.

Fixes #427
2018-10-28 11:48:05 +01:00
Sam Edwards b2bfb31114 general: Remove `using std::*` from headers
Also remove most `using namespace std;` statements. The only one that remains is in py_panda.h.

Closes #350
Closes #335
2018-06-14 16:04:49 +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 e0245d2777 First step towards eliminating `using namespace std;` (#335) 2018-06-03 20:32:23 +02:00
rdb 3077316782 general: use proper deleted funcs instead of stubs with asserts
This gives better compile-time diagnostics and saves on code, while also better communicating intent.
2018-05-23 23:35:27 +02:00
rdb 29f50be15e Fix bug: copy-to-ram depth texture binding gets format set to RGB
This was a regression introduced by be8f4de337

Fixes: #212
2017-12-16 21:03:08 +01: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
rdb be8f4de337 display: add_render_texture should set correct texture format 2017-10-05 17:35:31 +02:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb 88e5cdfd86 More efficient clears for FBO 2015-12-21 17:59:48 +01:00
rdb eaabc1bfa5 Add ConfigVariableColor 2015-02-05 13:34:52 +01:00
rdb 65f786c8ff Fix #1186845: get_texture_card() no longer hangs multi-threaded pipeline. 2015-01-08 01:43:14 +01:00
rdb 95d85819b0 Separate out sampler state from texture, support sampler objects, support LOD min/max/bias 2014-12-12 15:58:45 +01:00
rdb 8b7217b4f9 Add an "off" ScissorAttrib, don't apply scissoring to overlay display region so that a full-window clear is truly a full-window clear 2014-09-16 20:44:39 +00: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
rdb eaab45dc9a Support for stereo FBOs 2013-08-25 19:52:31 +00:00
rdb e3301b8896 make_texture_buffer should request color and alpha bits by default (alpha bits for backward compatibility) 2013-08-14 23:13:29 +00:00
rdb 2274f2e651 FBO overhaul: support layered framebuffers (RTM_bind_layered), support render-to-2d-array, better respect FrameBufferProperties, more simple handling of RTP_depth_stencil 2013-08-13 12:44:27 +00:00
David Rose 93bd44e85e fix confusion with depth range of Lens::project() 2013-01-11 02:26:36 +00:00
David Rose 841bfb0743 fix Tut-Fireflies demo (problem with initially zero-sized buffers) 2012-02-12 21:40:16 +00:00
David Rose bb8867fb77 move GSG::get_supports_render_texture() into GraphicsOutput to support render-to-texture on non-Windows platform. Also, further fixes to FBO render-to-texture. 2012-02-11 21:09:35 +00:00
David Rose fffc982206 fixes to depth buffer for cube maps 2012-02-11 02:21:05 +00:00
David Rose 6d630e2cf1 auto-clear depth between eyes by default for stereo 2012-02-08 20:34:26 +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 fdca621619 slightly more robust handling of CallbackGraphicsWindow 2012-01-14 16:21:53 +00:00
rdb 2d78a0503b more easily extendable DisplayRegion 2012-01-07 18:52:20 +00:00
Zhao Huang ebc948b3f8 Fixed FBO Float Buffers; Multisample FBOS were left untouched and needs more work. 2011-12-31 21:43:18 +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
David Rose 6872488839 stereo/multiview textures 2011-08-08 18:55:26 +00:00
David Rose 0cf03bc158 untabify 2011-06-29 22:09:10 +00:00
rdb 009c00d9f1 commit super awesome patch from 11thPenguin 2011-02-13 06:51:18 +00:00
Bei Yang cec641bea1 Added support AuxFloat in add_render_texture 2010-08-26 19:21:00 +00:00
David Rose 9124513b82 side-by-side stereo 2010-07-19 18:43:24 +00:00
Bei Yang 626cb5966a Added a windows OpenGL implementation of finish frame and begin finish. This allows for frame flip syncronization across multiple machines. This is a change made by WDI to aid cave rendering 2010-06-11 16:43:53 +00:00
rdb ad0d9f1f78 Revert big mistake 2010-05-25 07:53:48 +00:00
rdb 66b5af633b Oops, minor correction 2010-05-21 16:42:56 +00:00
rdb e28653275d Don't add render texture if it is NULL 2010-05-21 09:17:05 +00:00
David Rose 58c13de4ca integrate changes from Schell Games (plus some tab character fixes) 2009-06-01 21:51:15 +00:00