Commit graph

91 commits

Author SHA1 Message Date
Kovid Goyal
1798c52f77
Centralize the cell shader defines 2023-06-23 16:18:17 +05:30
Kovid Goyal
098a38a3a9
Remove rendering via framebuffer for transparent windows with images
There is no need for it with the current rendering pipeline. Images are
blended with premult blending.
2023-06-21 16:06:07 +05:30
Kovid Goyal
5c735c123a
Fix defines in loading of graphics shader 2023-06-20 17:31:25 +05:30
Kovid Goyal
59a742e387
... 2023-06-20 14:13:23 +05:30
Kovid Goyal
aa0642d3e3
Show shader filename in compilation error messages 2023-06-13 22:06:22 +05:30
Kovid Goyal
46d6130edd
Build the multi-replace dict only once 2023-06-13 21:33:05 +05:30
Kovid Goyal
97746a26f5
Move loading of shader programs into shaders module 2023-06-13 18:08:39 +05:30
Kovid Goyal
9f377c5ccb
Cache shader source code loading 2023-06-13 17:58:17 +05:30
Kovid Goyal
85a955a796
Move shader loading code into its own module 2023-06-13 17:09:38 +05:30
Kovid Goyal
3a883ad436
Move the sprites GPU code to shaders.c 2017-09-15 10:45:22 +05:30
Kovid Goyal
1246032b67
Remove unused code 2017-09-15 10:45:22 +05:30
Kovid Goyal
44f456089b
Migrate the cell program 2017-09-15 10:45:22 +05:30
Kovid Goyal
d2b3052918
Code to get uniform locations 2017-09-15 10:45:21 +05:30
Kovid Goyal
c1dc4d0575
... 2017-09-15 10:45:20 +05:30
Kovid Goyal
9c184c794a
Migrate function to compile programs 2017-09-15 10:45:20 +05:30
Kovid Goyal
a1c9c90fc8
Start work on moving shaders.py to C 2017-09-15 10:45:20 +05:30
Kovid Goyal
83f4b6e391
Remove unused code 2017-09-15 10:45:20 +05:30
Kovid Goyal
7113d5c293
Use a mapped buffer to send color table to the GPU 2017-09-15 10:45:16 +05:30
Kovid Goyal
f324d8ec4f
Fix a couple of bugs in the buffer map API 2017-09-15 10:45:15 +05:30
Kovid Goyal
281cb50780
API to map OpenGL buffers 2017-09-15 10:45:15 +05:30
Kovid Goyal
f44d56b116
Ensure GIL is not released when rendering sprites 2017-09-15 10:45:10 +05:30
Kovid Goyal
6127d2d122
Make the sprite map globally accessible from C code as well as python code
The lock was removed as the Python GIL is sufficient to serialize access
to the SpriteMap structure.
2017-09-15 10:45:10 +05:30
Kovid Goyal
d7b433f6b7
API for Uniform Block Objects 2017-09-15 10:45:09 +05:30
Kovid Goyal
a44e3a3a50
Ensure line numbers reported by the GLSL compiler are correct 2017-09-15 10:45:08 +05:30
Kovid Goyal
e0e517d6ec
Modify VAO API to allow using multiple buffers 2017-08-23 17:32:46 +05:30
Kovid Goyal
3d15a1d786
Fix textures not being rendered in a render call that also uploads textures
The active texture should not be unbound in the upload texture functions
2017-08-22 18:34:25 +05:30
Kovid Goyal
1c56de5605
Change default usage mode to GL_STREAM_DRAW 2017-08-22 18:10:28 +05:30
Kovid Goyal
00e3ea8c08
Remove unused code 2017-08-22 17:32:40 +05:30
Kovid Goyal
36432c8616
API to conveniently download data from a vertex buffer 2017-08-22 12:51:30 +05:30
Kovid Goyal
03e0b9de04
Use vertex buffers instead of texture buffers
Apparently, integer samplers for textFetch() are broken on some macOS
Intel drivers. Fixes #101
2017-08-22 12:08:35 +05:30
Kovid Goyal
4364163ceb
Use a single buffer for multiple vertex arrays 2017-08-22 07:59:51 +05:30
Kovid Goyal
ffd9ec653d
Allow programs to be used with multiple vertex array objects 2017-08-22 00:24:45 +05:30
Kovid Goyal
277c46908d
Remove unused code 2017-08-21 23:55:39 +05:30
Kovid Goyal
afa767c3a8
Support vertex attrib divisors 2017-08-21 23:24:05 +05:30
Kovid Goyal
67ec04fba3
Also use the buffer manager for vertex arrays 2017-08-21 23:10:25 +05:30
Kovid Goyal
f35bf7f1ba
Move buffer management into its own class 2017-08-21 22:53:13 +05:30
Kovid Goyal
be06669e8f
Ensure we dont exceed GL_MAX_TEXTURE_BUFFER_SIZE 2017-08-21 20:53:02 +05:30
Kovid Goyal
05f5a05c20
Ensure sprite map size tracking is always correct 2017-08-21 17:39:30 +05:30
Kovid Goyal
7e79aac275
Fix incorrect tracking of previous buffer sizes to avoid re-allocs 2017-08-21 17:12:46 +05:30
Kovid Goyal
0a21819e16
DRYer 2017-08-21 16:53:04 +05:30
Kovid Goyal
fe3e51a00d
Move the GLSL shaders into their own files 2017-08-21 16:39:34 +05:30
Kovid Goyal
21874339f1
Remove un-needed binding of the sprite_map buffer 2017-08-21 15:51:55 +05:30
Kovid Goyal
4f22fcdaac
Code to verify buffer uploads are working 2017-08-21 15:30:50 +05:30
Kovid Goyal
0bbea6812e
Avoid unnecessary reallocs for cell data
Only re-allocate when the buffer size changes
2017-08-21 14:56:29 +05:30
Kovid Goyal
101a50b0ff
Do not use GL_ARB_texture_buffer_object_rgb32
This is not available on macOS using Intel graphics cards
2017-08-21 12:46:09 +05:30
Kovid Goyal
421ae6d289 Ensure texture buffer is bound before uploading to it 2017-02-24 14:35:02 +05:30
Kovid Goyal
063ec7dc02 Fallback implementation for glCopyImageSubData
OS X is missing this function so we fallback to a very slow,
GPU->CPU->GPU roundtrip. Fortunately this is needed only rarely so it
should not have a noticeable performance imapct. Le bubbling sigh!
2017-01-11 23:36:43 +05:30
Kovid Goyal
41c63917c8 ... 2016-12-10 09:41:25 +05:30
Kovid Goyal
b3c9763519 ... 2016-12-10 09:38:18 +05:30
Kovid Goyal
0a13899571 Ensure Sprites.render_cell() always returns a valid cell 2016-12-10 09:30:30 +05:30