160 Commits

Author SHA1 Message Date
Le Philousophe
ed3e83a26d GRIM: Don't prevent Z-buffer update when bitmap has changed
The previous chack was essentialy based on data pointer being different
between successive updates.
Sometimes the memory allocator reuses the same memory space for two
different bitmaps and the z-buffer isn't updated.
2022-04-16 14:54:53 +02:00
Le Philousophe
352d42f52c GRIM: Don't access uniforms array items individually
Accessing an array item is only allowed for arrays of structures which
got removed because not supported on RPi.
Instead we build an array with all variables laid out sequentially and
set uniform once.
2022-04-03 09:40:51 +02:00
Le Philousophe
dda9a66f7a GRIM: Fix z-depth shader rendering on big-endian hosts
The value read is done in shader on a byte basis so we must set the
expected layout
2022-04-03 09:40:51 +02:00
Le Philousophe
d9b4e457e8 ALL: Remove USE_GLES2 define
Replace it with USE_FORCED_GLES2
2022-01-18 16:49:03 +01:00
Cameron Cawley
43d87cb029 BACKENDS: Support detecting OpenGL ES 2 at runtime for 3D games 2021-12-30 13:57:50 +01:00
Paweł Kołodziejski
20cb0ae228
ALL: Cleanup ResidualVM -> ScummVM 2021-12-26 21:19:38 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paweł Kołodziejski
66bc1955e8
GRIM: Cleanup pixel formats for textures 2021-12-04 22:21:12 +01:00
Paweł Kołodziejski
af37825be3
ENGINES: Replace PixelBuffer with Surface 2021-11-27 20:14:44 +01:00
Cameron Cawley
4d206e5286
GRAPHICS: Clean up OpenGL defines (#3551) 2021-11-18 00:56:21 +01:00
Orgad Shaneh
415986010e GRIM: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Orgad Shaneh
33a4eaa4d2 GRIM: Replace new[]/memset with new[]() 2021-11-10 19:53:15 +01:00
Torbjörn Andersson
319b1b3d22 GRIM: Silence GCC warning
Though it seems a bit consistent that _numFaces is signed here, and
unsigned in other classes.
2021-10-02 14:19:47 +02:00
Einar Johan Trøan Sømåen
7dba601636 GRIM: Fix getScreenBoundingBox for OpenGL with shaders
Just copy-pasted the contents of the Escape from Monkey Island
code below, and made adjustments based on the diff between
the two functions as they are in the regular OpenGL renderer.
2021-10-02 11:42:58 +02:00
LMerckx
d76faf125c
GRIM: Simplify shaders for Raspberry PI (#2618)
* GRIM: Simplify shaders for Raspberry PI
2020-11-13 06:22:20 +01:00
Laurent Merckx
741cd5ddc7 GRIM: use GL_UNSIGNED_SHORT for glDrawElements instead of GL_UNSIGNED_INT (not supported for GLES <= 2) 2020-11-12 05:58:36 +01:00
Matthieu Milan
782bfa88ad
EMI: Fix screenshot when saving on ES2 (#2587) 2020-11-02 18:42:01 +01:00
Cameron Cawley
03e8f0ed2d
ENGINES: Remove code for toggling fullscreen mode (#2523)
* GRIM: Remove code for toggling fullscreen mode

* MYST3: Remove code for toggling fullscreen mode

* STARK: Remove code for toggling fullscreen mode

* ENGINES: Remove the fullscreen argument from initGraphics3d()
2020-10-14 07:49:28 +02:00
SupSuper
9ed8525c63 GRIM: Remove obsolete Windows headers 2020-10-09 21:24:52 +01:00
Pawel Kolodziejski
11f15a2bfa GRIM: Rename shaders files to be unique per engine 2020-10-07 00:37:20 +02:00
Pawel Kolodziejski
b8ae32d71b GRIM: Remove unused return value from GfxBase::setupScreen 2020-10-05 20:03:16 +02:00
Pawel Kolodziejski
fb636cadde GRIM: Drop setting windows title with used renderer. 2020-10-05 07:59:10 +02:00
Pawel Kolodziejski
a8b53f8f21 ALL: Avoid class names clashing with ScummVM classes 2020-09-28 18:47:10 +02:00
Pawel Kolodziejski
27e12d8a96 ALL: Eliminate LOCAL_PI macro 2020-09-23 23:20:23 +02:00
Dries Harnie
8c95812106 GRIM: Reset OpenGLS matrix stack in startActorDraw
Fixes #1591.
2020-05-17 10:00:15 +02:00
Mathias Parnaudeau
e395d8d15d GRIM: Fix resource leak calling releaseMovieFrame
In EMI and GRIM games, a resource leak was found with OpenGL and
OpenGL-shaders engines: releaseMovieFrame() was not called in the destructor
of these graphics drivers (and never called at all on exit).
This patch calls explicitely realeaseMovieFrame.

Note that is was already done correctly with TinyGL.
2020-02-21 07:16:34 +01:00
Pawel Kolodziejski
37c004f2cd GRIM: Prevent struct Lights clashing - fixing compilation with older compiler 2020-01-06 00:36:40 +01:00
Cameron Cawley
83002b66dc ANDROID: Clean up touch screen input 2019-04-12 20:30:17 +01:00
Matthieu Milan
9975b8695b GRIM: Image format must match internalformat for sprites too (ES2) 2019-02-01 21:47:47 +01:00
Bastien Bouclet
f4e3bd0424 GRIM: Take adventage of kFeatureFullscreenToggleKeepsContext 2017-09-01 09:26:57 +02:00
Vincent Pelletier
ae6b5b8c8e GRIM: Add support for reversed 32bits color endianness.
Also, reduce differences between opengl and shader prepareMovieFrame.
2016-11-06 10:07:40 +01:00
Paweł Kołodziejski
ca64a5677d Merge pull request #1258 from vpelletier/shader_lighting
GRIM, SHADERS: Toggle light inside drawMesh.
2016-07-14 09:55:55 +02:00
Bastien Bouclet
14b5763408 GRIM: Fix memory leaks related to EMI models 2016-07-12 06:16:36 +02:00
Bastien Bouclet
62bf521944 GRIM: Fix memory leaks related to the emergency built-in font 2016-07-12 06:16:35 +02:00
Vincent Pelletier
c57691c751 GRIM, SHADERS: Drop no-op calls in GfxOpenGLS::drawMesh.
disableLight/enableLight only set _lightsEnabled, and nothing reads it
between these two calls.
2016-07-10 01:06:25 +00:00
Vincent Pelletier
7108b8cbe9 GRIM, SHADERS: Toggle light inside drawMesh.
Fixes appearance of roulettes in cn and beavers in dm (#1186).
2016-07-10 01:06:25 +00:00
Bastien Bouclet
e97279aeab GRIM: Don't enable / disable GL_TEXTURE_2D in the programmable pipeline
It is an invalid operation.
2016-06-26 09:28:14 +02:00
Bastien Bouclet
0362ac0dbc GRIM: Don't use OSystem::getScreenPixelBuffer in the OpenGL renderers 2016-06-11 12:07:38 +02:00
Bastien Bouclet
3f295ec773 GRIM: Check at runtime that shaders are available 2016-02-06 08:53:42 +01:00
Bastien Bouclet
31715787ca SYSTEM: Add a system method for retrieving the screen framebuffer 2016-02-06 08:53:41 +01:00
Bastien Bouclet
6c78bcebe4 GRAPHICS: Move opengles2 files to the opengl folder 2016-02-06 08:02:49 +01:00
Paweł Kołodziejski
f40da7598e Merge pull request #1220 from vpelletier/move_computations_out_of_renderer
Move computations out of renderer
2016-01-09 12:17:35 +01:00
Vincent Pelletier
9bef2bd626 GRIM,EMI: SHADERS: Compute umbra angles cosine on set load instead of for each frame
Only benefits shaders renderer, as opengl/tinygl renderers leave such
details to the gl library.
Maintain saved-state compatibility by computing on restore.
2016-01-01 23:07:59 +01:00
Vincent Pelletier
ea8245696b GRIM,EMI: Scale intensity on change instead of for each frame
Also uniformises intensity scaling factor implementation across renderers.
Maintain saved-state compatibility by computing on restore.
2016-01-01 23:07:59 +01:00
Bastien Bouclet
8d5406720c ENGINES: Add a new 'renderer' option to replace 'soft_renderer'
'soft_renderer' was a bool and was not useful to select a renderer
in a list with more than two values.
2015-12-29 07:55:27 +01:00
Christian Krause
b186c21f85 EMI: Fix wrap around of Layers/Frames
This patch makes sure, that Layer::_frame is smaller than numLayers
of the bitmap in order to prevent out-of-bounds access to
BitmapData::_layers.
2015-05-16 10:39:08 +02:00
Christian Krause
d7e7ee214d GRAPHICS: Enable drawing of bitmaps/tiles with just one sub-image
Instead of using the number of sub-images to decide whether bitmaps
should be drawn using TIL information, better use the existance
of texture coordinates which are distinctive for tiles.
2015-05-05 23:19:16 +02:00
Dries Harnie
1d715329c2 Merge pull request #1187 from chkr-private/opengls-emi-fixes
GRAPHICS: Set uniform parameters for _spriteProgram
2015-04-28 16:57:55 +02:00
Dries Harnie
4955a71424 Merge pull request #1188 from chkr-private/opengls-fixes
GRAPHICS: Remove unused shader uniform variables
2015-04-28 16:52:15 +02:00
Christian Krause
a2e1c64d36 Merge pull request #1176 from chkr-private/screen-texture-lighting-fixes
EMI: Check bit in mesh face flags to disable lighting
2015-04-27 22:21:03 +02:00