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
Christian Krause
c2060b1649
GRAPHICS: Set uniform parameters for _spriteProgram
...
Set the uniform parameter for _spriteProgram
since they are needed by emi_actor.{fragment,vertex}
in drawSprite().
2015-04-27 21:46:16 +02:00
Christian Krause
4b8fcda1a1
GRAPHICS: Remove unused shader uniform variables
2015-04-27 21:01:42 +02:00
Dries Harnie
1bb9cd5258
EMI: Enable primitives drawing [OpenGLS]
2015-04-21 11:19:42 +02:00
Vincent Pelletier
8364862329
GRIM: SHADERS: Use the same coordinates as opengl renderer.
...
Reorder vertices to suit GL_TRIANGLE_STRIP instead of GL_QUADS.
Fixes Copal's computer display (checkbox border being offset) and save/load
menu arrows.
2015-04-07 08:52:22 +02:00
Bastien Bouclet
d1b72c7975
GRIM: Perform alpha testing when rendering actors with the shaders renderer
...
Fixes transparency for the tie rope and Glottis' head
2015-03-29 14:10:36 +02:00
Bastien Bouclet
1908a43d18
GRIM: Actors and billboards should not share the same shader uniforms
...
Fixes Manny's smoke idle animation
2015-03-23 23:24:28 +01:00
Vincent Pelletier
1fd56d769c
GRIM,EMI: SHADERS: Move 3 multiplication per light from CPU to GPU.
...
GPU already has to multiply intensity, this change just changes initial
shader-level intensity from fixed 1.0 to data value (after per-game
scaling). Use color w coordinate, as it already used as a boolean light
switch.
2015-03-22 14:15:31 +01:00
Vincent Pelletier
2b12ebbbe8
GRIM: SHADERS: Enable lighting.
2015-03-22 14:15:31 +01:00
Vincent Pelletier
25af91b4a8
GRIM: SHADERS: Pass light parameters to actor vertex shader.
...
They contain (pen)umbra angles for spotlights.
2015-03-22 14:15:30 +01:00
Vincent Pelletier
2990d241e1
GRIM,EMI: SHADERS: cos() expects radiants, _(pen)umbraangle is in degrees.
...
Also, use cosf() instead of cos(), the latter working on doubles.
2015-03-22 14:15:30 +01:00
Vincent Pelletier
1ab56fa3cd
GRIM: SHADERS: Get rid of the last mention of 1.3 intensity coefficient.
...
Also, reduce code duplication and avoid redundant divisions.
2015-03-22 14:15:30 +01:00
Christian Krause
a8460f4f3f
EMI: Check bit in mesh face flags to disable lighting
...
Use bit 0x20 in the mesh face flags to disable ligthing. This
fixes the problem that once a previous screen is used as
texture (e.g. in the intro or for the transition effects
in set kab when walking eastwards or westwards), it is shown
too dark due to the applied static lighting for overworld
actors.
2015-02-24 22:49:48 +01:00
Christian Krause
28804cd9fe
EMI: Flip y coordinate when creating screenshot textures
...
With OpenGL the created textures were mirrored in y direction
because OpenGL uses a different coordinate system where (0, 0)
is the bottom left corner.
2015-02-23 20:24:57 +01:00
Christian Krause
6d226501b5
EMI: Implement mesh-specific alpha values
...
- if Lua_V2::SetActorGlobalAlpha() is called with a mesh name,
set a mesh-specific alpha value / mode
- use this alpha value in drawEMIModelFace()
- fixes the problem that the whole actor vanishes in some scenes
(e.g. when entering or leaving the porch of the of LUA bar)
2015-02-17 01:57:07 +01:00
Christian Krause
789da551fc
GRIM/EMI: Add nullptr checks to avoid segfaults on cleanup
2015-01-13 21:12:23 +01:00
Christian Krause
ad2ce4a87e
EMI: Fix memleaks caused by specialtyTextures
...
- delete screenshot after texture is created
- free _data[] entries in BitmapData::freeData()
- destroy _specialtyTextures[] entries in
graphic driver's destructors
2014-12-31 15:47:36 +01:00
Dries Harnie
ae4f9e20d4
EMI: Properly set viewMatrix as well [OpenGLS]
2014-11-24 14:07:30 +01:00
Dries Harnie
c0ec475288
EMI: Support overworld actors [OpenGLS]
2014-11-23 23:15:10 +01:00
Dries Harnie
e06056e7be
EMI: Factor out makeFrustumMatrix
2014-11-23 23:14:59 +01:00
Dries Harnie
0a73f11e9c
GRIM: Enable screenshot saving on ES2
2014-10-11 12:48:00 +02:00
Christian Krause
d9ade245d6
GRIM/EMI: Use the correct setUniform function for "alphaRef"
2014-09-17 01:24:31 +02:00
Christian Krause
598bfc5fe9
GRIM/EMI: Call glViewport for apitrace compatibility
...
glViewport needs to be called once to avoid the apitrace
error: "could not infer drawable size (glViewport never called)".
This fixes the problem that all apitrace framebuffer pictures
had a default size of 32x32 instead of the correct resolution used
in residualvm.
2014-09-17 01:17:29 +02:00
Dries Harnie
c2318c7153
EMI: Use half-transparent plane to implement dimScreen (OpenGLS)
...
- instead of re-calculating the color values when dimming the screen,
better draw a half-transparent plane after drawing all non-overworld
characters
- fixes the issue that overworld actors were dimmed and that the
pause screen is transparent when the inventory is open
2014-09-15 20:44:35 +02:00
Dries Harnie
ef403a49d0
GRIM/EMI: Initialize _storedDisplay after setupScreen
2014-08-29 23:45:14 +02:00
Joel Teichroeb
6a852161c7
Merge pull request #999 from JoseJX/Camera
...
EMI: Keep camera as a rotation matrix and add Lua functions for changing it.
2014-08-19 17:21:43 -07:00
Joseph Jezak
ff9f26981c
EMI: Refactor to use a matrix for the camera.
2014-08-19 18:35:26 -04:00
Joni Vähämäki
915e12321c
GRIM: Enable alpha test when drawing sprites.
2014-08-18 13:09:42 +03:00
Christian Krause
cbbf60d155
EMI: Check another bit in the mesh face flags to enable blending.
...
Bit 0x40000 in the mesh face flags (set only in the intro) should
enable blending, too. This fix lets the various screens of the intro
fade into each other.
2014-08-14 03:01:12 +02:00
Joni Vähämäki
40f5f7360f
EMI: Fix alpha test in OpenGLS.
2014-08-12 17:46:50 +03:00