So caller does not have to depend on the pixel format used internally to
BlitImage.
Update callers which do request for color keying (GRIM/EMI only).
Also, remove a special-casing of transparent color when converting image
format which sets a color in a packed format independent from actual
destination format.
Also, in GfxTinyGL::createTextObject, prefer changing invisible colorKey
value than actually-visible color.
Reduces vertex redundancy.
In TinyGL, fixes checkbox border on Copal computer (actually, works around
yet another discrepancy between OpenGL and TinyGL on 1-pixel-thick
[T]GL_QUADS).
Before this change, drawRectangle, drawLine and drawPolygon directly drew
to framebuffer, bypassing all TinyGL dirty-region detection and handling.
As a result, these drawings would only be visible when forcing TinyGL to
refresh the entire window.
Copy code from OpenGL renderer and do minor tweaks to make TinyGL happy.
There are still glitches (checkboxes on Domino's computer, ticket
printer digits) but something decent (correct position & size) gets
rendered.
Enabling quadratic atenuation, even with values as low as 0.1, reduces spot
lighting too much in (at least) sets "do" (see Domino), "al" (see Manny when
walking along the garage door), "hq" (see Salvador).
Disabling is not perfect either, as attenuation can be seen (at least) in
set "tu" (see fire extinguisher), but it should be overall better.
Also, it should be noted that perfect fidelity cannot be achieved with openGL
fixed pipeline, as DirectX spotlight have two angles (0 <= phi <= theta <= pi),
atenuation being null below phi, full above theta, transitioning with a
configurable exponent between both (defaults to angle-linear). OpenGL would
correspond to phi=0 and theta=pi (ie, transition is always done between fixed
angles), plus a configurable hard cutoff.
Determined by enabling a single omnidirectional light (newlight9 in set
"ce", which stands at set entrance toward elevator) and comparing
luminosity level on Manny at several locations in that scene with original
software renderer.
This set is quite convenient for this comparison, as Manny position can be
easily controlled: stick to the wall with the red arrow pointing at the
stairs, making movements one-dimensional.
For spotlight, set "tu" was used with the single spotlight on, walking
from the fire extinguisher to server door, confirming similar attenuation.
From these tests, it seems only quadratic attenuation is used, which makes
sense as it gives a realistic effect.
Determined by keping a single directional light source enabled, as they are
not subject to attenuation (having no position), and comparing with
original software renderer.
Default DirectX material reflects all diffuse light, so 1.0f coefficient is
likely correct.
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.
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.
- 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)
- delete screenshot after texture is created
- free _data[] entries in BitmapData::freeData()
- destroy _specialtyTextures[] entries in
graphic driver's destructors
Per convention, in residualvm the default GL current color
should be (1.0f, 1.0f, 1.0f). If a function changes the color,
it is required to reset it before returning.
This fixes the issue that some videos were not correctly displayed
until the next glColor call (e.g. when drawing the sub-titles) was
issued.
- 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