Le Philousophe
7794de5e5e
GRAPHICS: OPENGL: Allow sscanf_s for GLAD
...
It is properly guarded so it won't bring any portability problem and the
file is autogenerated so this avoids to patch the file.
2024-06-01 13:42:01 +02:00
Le Philousophe
a31ea07f82
Revert "GRAPHICS: OPENGL: Disable usage of sscanf_s"
...
This reverts commit 5040e1129d .
Instead of modifying an autogenerated file, patch around it.
2024-06-01 13:42:01 +02:00
Eugene Sandulenko
5040e1129d
GRAPHICS: OPENGL: Disable usage of sscanf_s
...
This follows the earlier commit that added this symbol to forbidden.h
The code in glad.h is not using any features of sscanf_s, e.g.
sizes for the provided strings for safety, so it is not clear
why are they using it. Perhaps because it is declared "safer"
2024-05-30 09:24:59 +02:00
Le Philousophe
635cb6b998
GRAPHICS: OPENGL: Upgrade glad headers
...
This allows to remove a workaround in context creation
2024-03-17 15:39:32 +01:00
Hubert Maier
794f292b5d
AMIGAOS: Use compiler defines
2024-03-16 01:59:27 +02:00
Christian Kündig
7aa72a1633
EMSCRIPTEN: OPENGL: Disable GLAD
2024-02-27 17:07:13 +01:00
Christian Kündig
65bdafa0a0
EMSCRIPTEN: OPENGL: Disable OPENGL_DEBUG on Emscripten
...
863988f was causing a 10x increase in frame times regressing GRIM from 55fps to 3-5 fps.
2024-02-27 17:07:13 +01:00
Le Philousophe
42fa87acea
GRAPHICS: OPENGL: Don't try to use GLAD aliasing for shaders
...
Aliasing doesn't cover all the functions we use.
In addition, old GLSL 1.00 doesn't support the #version stance.
2024-01-27 09:44:39 +01:00
Le Philousophe
03a53b1a1e
OPENGL: Fix GLSL version parsing
...
Some old GLES2 implementation did have a different version prefix.
Be more relax like almost everyone and look for the first digit to start
parsing.
2023-12-28 09:31:31 +01:00
Cameron Cawley
5b1b14ad80
COMMON: Mark more symbols as const
2023-12-26 20:23:59 +01:00
Le Philousophe
226de788c8
GRAPHICS: Make API use the Path class
2023-12-24 13:19:25 +01:00
Le Philousophe
802c91554f
COMMON: Make extrapath a Path object
2023-12-24 13:19:25 +01:00
Le Philousophe
306ca933d4
OPENGL: Use GLAD version when available and check functions before use
...
When GLAD fails to parse version, glGetError is null and raises a
SIGSEGV.
Current version of GLAD has a bug while parsing extensions so there is a
workaround here which should disappear when it's fixed.
2023-12-14 18:37:23 +01:00
neuromancer
7a96738168
GRAPHICS: OPENGL: added another setUniform function to set an uniform value in shaders from an array of ints
2023-04-04 20:00:17 +02:00
neuromancer
5d92a98038
FREESCAPE: initial implementation of the opengl shader renderer
2023-04-01 23:12:43 +02:00
Le Philousophe
6bbcd95c10
GRAPHICS: Handle cases where glGetString returns a nullptr
2023-03-11 18:19:54 +01:00
Cameron Cawley
cc47ebd314
OPENGL: Add debug output for more features
2023-02-12 19:27:47 +00:00
Cameron Cawley
58e96a8755
OPENGL: Check if GL_TEXTURE_MAX_LEVEL is supported before using it
2023-02-05 22:31:57 +01:00
Le Philousophe
b1ebc64c03
GRAPHICS: OPENGL: Free log after using it
2023-01-28 18:44:51 +01:00
Eugene Sandulenko
4dcfc483e8
GRAPHICS: OPENGL: Do not search shaders in dev environment in release builds
2023-01-05 15:29:33 +01:00
grisenti
a8b8b5263f
OPENGL: add hpl1 shaders directory in shader class
2022-12-23 14:03:40 +01:00
Le Philousophe
94b8f34302
GRAPHICS: Don't use unsafe sprintf and vsprintf
2022-10-23 22:46:19 +02:00
Le Philousophe
82cd971aca
OPENGL: Add more texture wrap modes detection
2022-10-16 19:43:05 +02:00
Le Philousophe
884c3aa795
OPENGL: Use the correct index when attribute is added after link
2022-10-09 18:30:29 +02:00
Le Philousophe
a205c79a98
OPENGL: Allow to get last call error status
2022-10-09 17:25:35 +02:00
Le Philousophe
cb36b46864
OPENGL: Allow loading of raw shader source
2022-10-08 23:39:18 +02:00
Eugene Sandulenko
31100637fa
GRAPHICS: OPENGL: Refactor for adding possibility to avoid calling error() directly
2022-10-08 23:39:18 +02:00
Paweł Kołodziejski
d9d0dfa20d
GRAPHICS, OPENGL: Updated GLAD and added EXT_texture_compression_s3tc
2022-09-11 11:43:13 +02:00
Le Philousophe
6c2c603df2
OPENGL: Fix cast on Vertex Attribute pointer
2022-07-16 09:57:42 +02:00
Le Philousophe
15235fa8ad
OPENGL: Add workaround for AmigaOS which supports GLSL 0.9
2022-07-13 19:00:15 +02:00
Le Philousophe
1b35e66c01
OPENGL: Dump GLSL version string
...
This will ease to debug parsing errors
2022-07-04 08:13:49 +02:00
Cameron Cawley
0eb11216fb
OPENGL: Add Shader::addAttribute()
2022-07-03 22:26:10 +03:00
D G Turner
8ee4251f41
OPENGL: Fix Integer to Pointer Cast GCC Compiler Warning
...
This is emitted when -Wint-to-pointer-cast is passed to GCC.
2022-06-30 01:04:59 +01:00
Cameron Cawley
c13961362f
OPENGL: Ensure that glGetError() is cleared before calling a checked function
2022-06-29 22:37:38 +01:00
Cameron Cawley
863988fee4
OPENGL: Add proper error checking to the Shader class
2022-06-29 22:37:38 +01:00
Cameron Cawley
fb1db0e94f
OPENGL: Allow enabling vertex attributes without using a VBO
2022-06-29 14:15:46 +01:00
Cameron Cawley
7b4aff4ac6
OPENGL: Add a return value to setUniform(), and use Common::String
2022-06-28 21:40:36 +01:00
D G Turner
6bcd18f126
OPENGL: Add Missing Header Defining USE_FORCED_GLES Symbol to Shader Code
...
This missing header meant that USE_FORCED_GLES would always be undefined
and thus by default resolve to false i.e. disabled.
2022-06-26 23:14:14 +01:00
Le Philousophe
98c306376f
OPENGL: Merge both OpenGL shaders objects
2022-06-26 18:32:10 +02:00
Le Philousophe
4ab044a254
OPENGL: Merge both OpenGL contexts
2022-06-26 18:32:10 +02:00
Le Philousophe
8569296384
OPENGL: Detect framebuffer support using GL_ARB_framebuffer_object
...
We use functions from GL_ARB_framebuffer_object extension and not from
GL_EXT_framebuffer_object where functions are suffixed by EXT.
This avoids crashes on implementations supporting only the EXT version.
2022-05-27 18:13:10 +02:00
Le Philousophe
c9b4949746
AMIGAOS: Improve shader compatibility
...
OGLES2 doesn't support uniform booleans so we use macros to make it use
integers in this case. For other platforms, this change should be a
noop.
OGLES2 doesn't like float suffix for constants, remove it as well.
2022-04-17 12:34:38 +02:00
Le Philousophe
1cf0b7d1b3
OPENGL: Unbind array buffer after using it
...
This avoids to mangle state for engines
2022-04-09 21:46:09 +02:00
Le Philousophe
b978cd1caa
OPENGL: Allow engines to detect OpenGL info without switching
...
For now only OpenGL type and shaders support are available
2022-04-03 22:17:19 +02:00
Le Philousophe
89cfc283ab
OPENGL: Use correct function to debug program linking
2022-04-03 09:40:51 +02:00
Cameron Cawley
460bc32cd9
OPENGL: Fix OpenGL ES v1 builds without GLAD
2022-03-07 17:40:01 +01:00
Paweł Kołodziejski
ee11c85f85
IOS: Added support for GLAD
2022-03-06 21:44:19 +01:00
Paweł Kołodziejski
710dac8029
OPENGL: Improve error handling for GL compiler by using dynamic allocated buffers.
2022-03-06 09:03:36 +01:00
Paweł Kołodziejski
786800e831
OPENGL: Skip adding suffix 'shaders' for iOS app, it has flatten tree.
2022-03-06 09:00:21 +01:00
Thunderforge
fd129ebc0c
JANITORIAL: "Mac OS X" and "OS X" to "macOS" in comments
...
Apple's desktop operating system was formerly called "Mac OS X" and "OS X", but since 2016 it has been called "macOS" (starting with version 10.12).
Changing across all comments and documentation to use this current terminology, except in cases where the historical versions are explicitly referenced. No code changes are made; we should consider changing those in future PRs.
2022-01-29 14:15:05 +01:00