Commit graph

165 commits

Author SHA1 Message Date
Grant Sanderson
9ac16ab722 Remove DEFAULT_FPS constant
It's a bit silly to have it's valued defined by camera_config, when it's only function is to be a default value for Camera's configuration
2024-12-10 20:19:25 -06:00
Grant Sanderson
4cc2e5ed17 Consolidate camera configuration 2024-12-10 11:39:13 -06:00
Varniex
04295ec177 Minor Bug fixed: window's bg color now changing. 2024-10-20 16:53:47 +05:30
Grant Sanderson
6d23df0497 Clean up changes associated with fixing aspect ratio issue 2024-09-06 12:50:19 -05:00
Grant Sanderson
8f1299929f Swap window buffer after blit from another fbo 2024-09-06 11:15:38 -05:00
Grant Sanderson
902a4f264e Add white space after assert statements 2024-08-16 12:15:55 -05:00
Grant Sanderson
a5ba721f96 Cease useless rendering
Change so that with a live window, rendering only happens if there has been an event (mouse motion, key press, etc.) to respond to.
2024-08-15 14:03:16 -05:00
Grant Sanderson
d3a4d81a63 Remove commended code 2023-01-31 16:08:43 -08:00
Grant Sanderson
fca5770b9f Fix Camera.blit 2023-01-31 16:06:53 -08:00
Grant Sanderson
9017df847d Add Camera.blit, and use it when there's a window, but the used fbo is not the window's 2023-01-30 20:38:13 -08:00
Grant Sanderson
daaaba0a67 Use frame_scale uniform instead of frame_shape 2023-01-30 15:10:41 -08:00
Grant Sanderson
277c471c90 Refactor so that view matrix incorporates frame scaling 2023-01-30 14:15:39 -08:00
Grant Sanderson
28c4921a1a Specify ctx type 2023-01-28 15:40:58 -08:00
Grant Sanderson
3a0916fe3a Reorganize fbo initialization 2023-01-27 10:12:53 -08:00
Grant Sanderson
e9333a908c Move camera.clear call into 'capture' 2023-01-26 20:38:38 -08:00
Grant Sanderson
a1595a9e2f Use separate fbo for writing to file when window is active 2023-01-25 22:34:11 -08:00
Grant Sanderson
a601384211 Remove stray imports 2023-01-25 19:23:22 -08:00
Grant Sanderson
424707d035 Move rendering more fully away from Camera to Mobject and ShaderWrapper 2023-01-25 14:13:56 -08:00
Grant Sanderson
2c737ed540 Move most of rendering logic to ShaderWrapper 2023-01-25 13:45:18 -08:00
Grant Sanderson
c94d8fd3b0 Move Texture handling and vao creation outside of Camera 2023-01-25 12:10:39 -08:00
Grant Sanderson
3299741359 Move program code to ShaderWrapper, away from Camera 2023-01-25 11:23:31 -08:00
Grant Sanderson
10047773f7 Have ShaderWrapper track OpenGL context 2023-01-25 10:49:30 -08:00
Grant Sanderson
8c1e5f3b42 Change use_clip_plane to be a function 2023-01-25 10:31:05 -08:00
Grant Sanderson
3339aad29e Separate CameraFrame into its own file 2023-01-25 10:19:44 -08:00
Grant Sanderson
7deaf4cb11 Small clean up 2023-01-25 09:51:27 -08:00
Grant Sanderson
272925fa19 Change winding fill blend_func 2023-01-24 21:46:52 -08:00
Grant Sanderson
088a2f65a3 Misc. clean up 2023-01-24 21:10:57 -08:00
Grant Sanderson
f0df5c759d Make winding fill optional, and make winding additive rather than toggling 2023-01-24 20:03:23 -08:00
Grant Sanderson
72da9786a3 Use null array for vert indices in place of None 2023-01-24 15:53:43 -08:00
Grant Sanderson
88ed1a2fdb Have init_fill_fbo take in ctx as an argument 2023-01-24 15:28:09 -08:00
Grant Sanderson
87afdac6a4 Small clean up 2023-01-24 14:09:41 -08:00
Grant Sanderson
6e56c31d67 Use gl_InstanceID instead of hacking triangle_strip 2023-01-24 13:49:43 -08:00
Grant Sanderson
4774d2bc3b First pass at a winding-based fill approach 2023-01-24 13:29:34 -08:00
Grant Sanderson
1dda706335 Small cleanup 2023-01-24 12:04:43 -08:00
Grant Sanderson
8a6deb4068 Enable recording during a Scene embed 2023-01-23 17:10:18 -08:00
Grant Sanderson
e2421a650c Don't disable clip plane 2023-01-23 17:06:49 -08:00
Grant Sanderson
b0cca9e4b6 Camera pixel_shape should reflect the drawn fbo 2023-01-23 17:04:44 -08:00
Grant Sanderson
c13495deeb Blit based on window's viewport, when in preview mode 2023-01-23 17:03:46 -08:00
Grant Sanderson
8d729eef5a Rename perspective to view_matrix 2023-01-23 14:41:17 -08:00
Grant Sanderson
e8b75941e0 Get rid of pixel_width and pixel_height attrs on Camera 2023-01-23 14:02:06 -08:00
Grant Sanderson
1d4fcf020b Refer directly to fbo viewports in get_raw_fbo_data 2023-01-23 11:54:01 -08:00
Grant Sanderson
8b786311af Rename set_ctx_clip_distance -> set_ctx_clip_plane 2023-01-22 09:45:41 -08:00
Grant Sanderson
39cda62b66 Remove texture_id == 15 hack 2023-01-22 09:07:26 -08:00
Grant Sanderson
d08a16a5fb Make Camera.fbo the entity rendered to, with a separate fbo for emitted frames 2023-01-20 16:31:09 -08:00
Grant Sanderson
8e2cf04b71 Simplify true_dot shaders 2023-01-18 15:36:00 -08:00
Grant Sanderson
cd3c5031fa Fix get_perspective_transform to shift before rotation 2023-01-18 13:59:50 -08:00
Grant Sanderson
6c2544098b Store pixel_size instead of pixel_shape 2023-01-18 13:50:09 -08:00
Grant Sanderson
b667d89e9b Simplify get_gl_Position 2023-01-18 13:44:41 -08:00
Grant Sanderson
1f613953d6 Don't pre-rotate light source 2023-01-16 19:34:20 -08:00
Grant Sanderson
77a3984683 Fix index buffer bug 2023-01-15 21:06:55 -08:00