SDL/src/render
Sam Lantinga 29f4a5ba0e Add GLES2 shader prologue infrastructure. (by @eloj)
There is supposedly an OpenGL ES2 target that does not support precision specifiers. However, the existing logic to detect this is currently broken in two ways:

1) There's a typo of the `#ifdef` as `#if`.
2) Checking for `GL_FRAGMENT_PRECISION_HIGH` can not be the correct way to detect this platform. Other targets, including some desktops, will also not have this defined (for various reasons).

Because some of the shader code is missing precision specifiers, and because a default is ONLY provided if `GL_FRAGMENT_PRECISION_HIGH` is set, these other targets break.

Instead of 'hard-coding' the prologue string into shaders in the C source, use our ability to provide a list of strings to `glShaderSource` instead, leaving the determination to run-time.

This commit closes https://github.com/libsdl-org/SDL/pull/6182
2022-09-06 15:55:27 -07:00
..
direct3d Adding SDL_GetWindowSizeInPixels for window size in pixels (#6112) 2022-08-24 11:25:13 -07:00
direct3d11 Adding SDL_GetWindowSizeInPixels for window size in pixels (#6112) 2022-08-24 11:25:13 -07:00
direct3d12 Refactored for similarity to surrounding code 2022-09-06 12:29:42 -07:00
metal Fix C89 declaration for macOS modules. 2022-06-27 15:19:40 -07:00
opengl opengl: Support NV12 textures on GPUs with only 2 texture units 2022-08-16 07:30:13 -07:00
opengles Added a utility function to calculate the next power of 2 for a value 2022-07-17 08:31:16 -07:00
opengles2 Add GLES2 shader prologue infrastructure. (by @eloj) 2022-09-06 15:55:27 -07:00
ps2 Adding specific SDL_Hint for the dynamic VSYNC 2022-08-30 07:20:36 -04:00
psp PSP: SDL_RenderCopyEx rotation and global scaling around the wrong way (see #bug 3070) 2022-02-15 11:34:50 +01:00
software Windows GDK Support (#5830) 2022-06-27 10:19:39 -07:00
vitagxm Vita: create rendertarget color surface with same format as texture. Fixes #5844 2022-06-26 15:41:14 -07:00
SDL_d3dmath.c DirectX 12 Renderer (#5761) 2022-06-06 17:42:30 -07:00
SDL_d3dmath.h Add support for SDL_render_d3d12.c to compile in C++ mode 2022-06-26 15:35:18 -07:00
SDL_render.c Round coordinates so very small floating point values don't turn into 0x80000000 2022-08-23 07:42:48 -07:00
SDL_sysrender.h Add dummy driver 2022-08-02 11:40:31 -07:00
SDL_yuv_sw.c Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_yuv_sw_c.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00