Commit graph

65 commits

Author SHA1 Message Date
Grant Sanderson
b64875fd55 Typo fix for primitive 2020-12-04 08:12:53 -08:00
Grant Sanderson
da972edfca Change when camera shift happens 2020-11-24 13:31:21 -08:00
Grant Sanderson
61424dbfec Factor out get_render_group_list 2020-06-29 18:25:56 -07:00
Grant Sanderson
2671817ae9 Refactor away from treating shader_info as a dictionary, and make it a proper type as ShaderWrapper. This also includes some cleanup in hos Camera renders 2020-06-29 18:17:18 -07:00
Grant Sanderson
2b3bd2bfce Use an index buffer for shaders to save memory 2020-06-29 11:05:09 -07:00
Grant Sanderson
279f66ceaf A little refactoring and performance improvement 2020-06-28 12:14:46 -07:00
Grant Sanderson
41fd6d4f4b Simply reorders where some methods are defined 2020-06-28 10:05:27 -07:00
Grant Sanderson
6a735e49b8 Refresh rotation matrix after interpolation 2020-06-27 12:17:53 -07:00
Grant Sanderson
90db32ee55 Have camera_frame remember rotation matrix by default 2020-06-27 12:10:51 -07:00
Grant Sanderson
6ba1eae8f6 Use ctx.vertex_array instead of ctx.simple_vertex_array 2020-06-27 00:00:50 -07:00
Grant Sanderson
60e1c88eb4 Slight tweaks to how shader_info id is found and stored 2020-06-26 23:05:25 -07:00
Grant Sanderson
212cdbb4d2 Speed improvements. Camera saves vbo for static mobjects, data in shader_data_info is saved and concatenated in raw form 2020-06-26 19:29:34 -07:00
Grant Sanderson
bb66a7c977 Releases moderngl buffers after use 2020-06-18 16:25:26 -07:00
Grant Sanderson
6a458547c3 Bug fix 2020-06-15 12:01:05 -07:00
Grant Sanderson
9d772496dd Removes the need to be able to recover shader_info from shader_id 2020-06-14 19:01:04 -07:00
Grant Sanderson
222b6d1220 Push depth test decision to the mobject level, as opposed to the camera 2020-06-14 17:41:47 -07:00
Grant Sanderson
61a3bd8102 Small change to make the ctx enable flag a little clearer 2020-06-13 15:20:17 -07:00
Grant Sanderson
429d63eebf Add special methods for setting angles 2020-06-09 21:25:00 -07:00
Grant Sanderson
8a060dfa3f Add axis_normalized option to quaternion_from_angle_axis 2020-06-09 20:40:36 -07:00
Grant Sanderson
5584521fb0 Change default focal distance 2020-06-09 17:59:03 -07:00
Grant Sanderson
7c4874bdad Changed how focal_distance works 2020-06-09 17:12:52 -07:00
Grant Sanderson
b91284b4aa Small shader fixes 2020-06-09 12:34:00 -07:00
Grant Sanderson
ccefbc0dea Add is_fixed_in_frame uniform which allows mobjects to not get rotated by the camera 2020-06-08 20:27:07 -07:00
Grant Sanderson
5d34cee014 Move frame resizing to get_gl_Position so that the screen rotation matrix remains det 1 2020-06-08 17:55:41 -07:00
Grant Sanderson
bab809b9a6 Allow for passing shader uniforms from mobjects 2020-06-08 15:57:12 -07:00
Grant Sanderson
39230a805c Better handling of textures, now letting multiple get passed in to a textured surface 2020-06-08 15:06:22 -07:00
Grant Sanderson
97304d9d86 Added multisampling to camera 2020-06-08 14:09:31 -07:00
Grant Sanderson
4968c7a8a1 Small note 2020-06-07 12:24:31 -07:00
Grant Sanderson
ba7a51931d Add shadow, and pull out lighting information to Mobject 2020-06-06 16:55:56 -07:00
Grant Sanderson
a204e422a5 Get rid of do-nothing self.ctx.multisample line 2020-06-05 13:23:38 -07:00
Grant Sanderson
cacfe67fe1 ParametricSurface replaces the role of SurfaceMobject, and instead of tracking normals infinitesimal nudges are tracked 2020-06-05 11:12:52 -07:00
Grant Sanderson
4c33b99d39 Very rudimentary 3dSurface type 2020-06-04 15:41:20 -07:00
Grant Sanderson
a232c32756 Changed camera frame from working in quaternions to working in Euler angles. For shame. 2020-06-03 10:38:57 -07:00
Grant Sanderson
38cc0a7174 Added glossiness to VMobjects 2020-06-02 16:18:44 -07:00
Grant Sanderson
725a7e3121 Enable 3d rotations 2020-06-01 16:21:18 -07:00
Grant Sanderson
ccb47db3bb fix pixel_coords_to_space_coords 2020-05-30 16:48:01 -07:00
Grant Sanderson
7785a06441 Move where refreshing shader uniforms happens 2020-03-06 06:16:09 -08:00
Grant Sanderson
68ac16e5fb Move rendering back to camera 2020-02-21 12:00:34 -08:00
Grant Sanderson
b373b7936a Move rendering to Mobject, and be smarter about caching data and vbo 2020-02-19 23:13:29 -08:00
Grant Sanderson
f1475463fc Just moving things around 2020-02-18 22:34:22 -08:00
Grant Sanderson
9d4b16d03f Moved around where batching mobjects by shader type occurs, while also pulling out some of the shader_id helper functions 2020-02-17 12:14:40 -08:00
Grant Sanderson
1a0b0e748c Fixed pixel_coords_to_space_coords 2020-02-14 10:52:39 -08:00
Grant Sanderson
cfbcd9faa8 Remove distinction between moving mobjects and static mobjects...computations to figure this out may now outweigh the actual render times they save 2020-02-13 15:42:53 -08:00
Grant Sanderson
7789038409 Fix bug with fbo initialization 2020-02-13 10:49:43 -08:00
Grant Sanderson
65828e0e36 Have mobjects pass texture data to camera, and change pixel_shape to come from the fbo viewport 2020-02-13 10:40:21 -08:00
Grant Sanderson
c7a99769ce Change order of camera.reset_pixel_shape args 2020-02-11 19:53:15 -08:00
Grant Sanderson
960e918e61 Basic preview window 2020-02-11 19:51:19 -08:00
Grant Sanderson
b243c522b1 Have Mobject pass their own render primative 2020-02-07 09:37:21 -08:00
Grant Sanderson
e185b87195 Moving some functions away from MovingCamera. Soon, all that should be default behavior of Camera 2020-02-04 15:27:50 -08:00
Grant Sanderson
63e5f343a3 Begin setting up Camera to work with shaders, not yet done 2020-02-04 15:27:21 -08:00