Commit Graph
2843 Commits
Author SHA1 Message Date
Paul Gilbert 44d616d9c0 GRAPHICS: Compilation fixes 2021-02-26 18:20:11 -08:00
Paul Gilbert 4142f7b7f8 GRAPHICS: Allow TTFFont to handle ManagedSurfaces with transparent pixels 2021-02-26 17:58:19 -08:00
Thierry Crozat f12813c630 GRAPHICS: Support having transparent ManagedSurface 2021-02-22 22:59:07 +00:00
Matthew Jimenez 286cccdafe GRAPHICS: Update TTF render color blending to work with any surface alpha level 2021-02-21 15:30:30 +00:00
Matthew Jimenez 85854120fa GRAPHICS: Improve TTF rendering on transparent surfaces.
Update color blending to match blending found in ManagedSurface. TTF rendering assumed the alpha channel of the surface was completely opaque. ULTIMA8 TTF rendering attempts to use a transparent surface and became near-illegible for text on scrolls. This change will affect TTF rendering on surfaces that are not already painted.
2021-02-21 15:30:30 +00:00
Paul Gilbert c53fb72922 GRAPHICS: Better 32-bit surface handling in ManagedSurface
Fixes several issues dealing with 32-bit surfaces, such as
- transBlitFrom between 32-bit surfaces
- 32-bit surfaces where the alpha channel is explicitly turned off
- Alpha blending when dest pixels are the transparent color
- Specifying colors to fill, line routines without alpha
2021-02-20 14:37:29 -08:00
Henrik "Henke37" Andersson 2300f0a7d4 MACGUI: Use getValOrDefault 2021-02-12 00:41:23 +01:00
Matthew Jimenez c9696cb36c GRAPHICS: Fix blending with default transColor on 32-bpp surfaces 2021-02-06 20:56:38 -06:00
Paul Gilbert 0589f9a817 GRAPHICS: Support 24-bit surfaces as dest for blitFrom 2021-02-06 16:37:31 -08:00
Paul Gilbert 81d891ebb0 GRAPHICS: ManagedSurface transBlitFrom ignore alpha matching transColor 2021-02-06 16:37:31 -08:00
Paul Gilbert 420cee48a5 GRAPHICS: Allow ManagedSurface blitting to ignore transparency 2021-02-06 16:37:31 -08:00
Martin Gerhardy b02ae40c9c GRAPHICS: allow scaling for opaque surfaces 2021-01-17 21:54:11 +01:00
antoniou79 5e467e1bbc GRAPHICS: FONT: Clarification for combo of wrapping flags
for the wordWrapTextImpl and the kWordWrapEvenWidthLines, kWordWrapOnExplicitNewLines bit flags
2020-12-09 18:53:42 +02:00
Bartosz Gentkowski 529b64d8cd DOXYGEN: Review of high prio files from graphics
Editing doxygen comments in:

- cursorman.h
- font.h
- managed_surface.h
- pixelformat.h
- surface.h
2020-12-01 23:24:37 +00:00
Bartosz Gentkowski a35cbeab46 DOXYGEN: Add doxy groups to remaining headers in 'graphics'
To make sure that they appear in the graphics group
in the doc structure.
2020-12-01 23:24:37 +00:00
Le Philousophe b093c9d6b5 GRAPHICS: Fix decoding of TTF font names
This fixes a buffer overflow when decoding font Unicode name as length
provided to decodeUTF16BE is in code units and not in bytes (twice less).
2020-12-01 20:03:07 +01:00
athrxx cf08894520 GRAPHICS: (SJIS) - SAGA adjustments 2020-11-22 19:02:43 +01:00
sluicebox b5241be248 SCI: Fix buffer overflow when loading Korean font
Fixes bug #11966
2020-11-21 00:51:26 -08:00
Cameron Cawley c877097b49 ALL: Remove use of "" in Common::U32String constructors 2020-11-16 16:56:58 +00:00
Vladimir Serbinenko 68a9136e4d COMMON: Rewrite Encoder and drop dependency on iconv (#2586)
Different platforms have different levels of support of encodings and
often have slight variations. We already have tables for most encoding
with only CJK missing. Full transcoding inclusion allows us to get reliable
encoding results independently of platform. The biggest con is the need for
external tables encoding.dat.

It removes a duplicate table for korean in graphics/korfont.cpp
2020-11-15 16:20:35 +01:00
Paweł Kołodziejski 9ee7215d4f GRAPHICS: Fixed logic typo "_format.aLoss = 8" -> "_format.aLoss == 8" 2020-11-12 12:07:22 +01:00
Vincent Pelletier 02294ee717 GRAPHICS: Use memcpy when copying to same-format-no-alpha destination
Accelerates when source format is compatible with destination except for
alpha channel bit-loss. Ex:
  from: 32bits A << 24 | R << 16 | G << 8 | B
  to:   32bits           R << 16 | G << 8 | B
2020-11-12 08:16:52 +01:00
Vincent Pelletier f8c72b5967 TINYGL: Move texture resampling from create time to render time
Thanks to pixel repacking using cpu data cache, this has a low runtime
cost even for TGL_LINEAR.
Adds support for TGL_NEAREST.
Adds support for TGL_MIRRORED_REPEAT, TGL_CLAMP_TO_EDGE and TGL_REPEAT.
Also, add support for more texture clamping and resampling options.

Mipmaps are not supported, although their sampling modes will be
applied - but to the full-size texture instead of selected mipmap.

Note: Texture sampler is still chosen at texture creation time.
2020-11-12 08:15:39 +01:00
Vincent Pelletier bd37cd3012 TINYGL: Make gl_resizeImage* pixel-format-independent 2020-11-12 08:13:49 +01:00
Vincent Pelletier 0108c11d98 TINYGL: Add support for more texture color formats 2020-11-12 08:03:48 +01:00
Vincent Pelletier b7b797d74d TINYGL: Use PixelBuffer for texture pixel format conversion
Instead of duplicating pixel-unpacking logic.
2020-11-12 07:49:15 +01:00
Vincent Pelletier c6685bdba3 GRAPHICS: Store pixels in native order in PixelBuffer
Pixel format is supposed to specify the correct ordering for the
platform already. Improves the situation on big endian archs.
2020-11-12 07:47:55 +01:00
Eugene Sandulenko 458b2332d5 JANITORIAL: Formatting fixes 2020-11-09 19:33:57 +01:00
Laurent Merckx 373f872dfa GRAPHICS: Fix no shader error on Raspberry PI 2020-11-09 17:41:26 +01:00
D G Turner e74f225731 GRAPHICS: Fix Compilation Breakage from Merge of Korean Font Code
This breaks compilation on several platforms due to the initialization
in the header. This is replaced by adding a constructor / destructor
instead as per the other class, which also will aid future development
of this code.
2020-11-09 07:40:40 +00:00
wonst719 00bd552840 SCI: Korean code cleanup
- Move repeated message.map tests into ResourceManager::isKoreanMessageMap()
- Fix comments
- Fix formatting
- Remove unused codes
2020-11-08 22:26:31 +02:00
wonst719 71d0362b75 GRAPHICS: Rewrite Korean codepage conversion code 2020-11-08 22:26:31 +02:00
wonst719 25da3603e4 SCI: Korean code cleanup
- Remove unused function definitions
- Remove unnecessary #include
- Fix comment
- Fix license header
2020-11-08 22:26:31 +02:00
wonst719 b7664c24dc SCI: Korean fan translation support 2020-11-08 22:26:31 +02:00
Thierry Crozat 2d64cba73a GRAPHICS: Remove unused function
This was a left over from GUI conversion to U32String.
2020-11-04 22:25:43 +00:00
Vladimir Serbinenko 3fc822e55c COMMON: introduce substr for U32String (#2585)
It's safer than direct array manipulation. Replace current uses
of subsetting with substr.
2020-11-01 22:53:03 +01:00
Eugene Sandulenko 87beb98b95 GRAPHICS: Turn set of bool parameters for wordWrap() to a bitfield 2020-10-16 23:52:18 +02:00
Cameron Cawley 1bf1fb40fc CONFIGURE: Allow building with TinyGL disabled (#2528) 2020-10-14 20:31:22 +02:00
Paweł Kołodziejski 51d25636bc GRAPHICS: Missed one opengl ifdef 2020-10-14 08:57:23 +02:00
Paweł Kołodziejski 9abb3f5111 BACKENDS: Another attempt to fix opengl flags 2020-10-14 07:45:56 +02:00
Paweł Kołodziejski e3cd0da0df BACKENDS: Attempt to fix buildbot targets 2020-10-14 07:06:18 +02:00
BeWorld cab7cd49c4 MORPHOS : Fixed for int vs int32 types for AmigaOS/MorphOS (#2510)
MORPHOS : Fixed int to int32 and some functions not available on AmigaOS/MorphOS
2020-10-11 18:24:36 +02:00
Paweł Kołodziejski 7bcce1fb7a GRAPHICS: Add missing OpenGL ifdef guard 2020-10-11 09:01:45 +02:00
Paweł Kołodziejski 264f6f037b ALL: Separate USE_OPENGL and USE_OPENG_GAME. Exclude WME3D for GLES2 for now. 2020-10-10 14:12:07 +02:00
Paweł Kołodziejski 35b9cccbde ALL: Merge ResidualVM 2020-10-09 19:44:13 +02:00
Pawel Kolodziejski b321938c7b TINYGL: Restored ability to create internal buffer based on pixel format 2020-10-05 08:09:20 +02:00
Pawel Kolodziejski 2e68577f1a GRAPHICS: No need to keep comment anymore 2020-10-04 14:03:36 +02:00
Paweł Kołodziejski 7c5e1c01ed GRAPHICS: Fixed caching alpha information in YUV to RGB conversion code. 2020-10-04 14:02:44 +02:00
Pawel Kolodziejski d8f2040dba ALL: Drop setupScreen API, use new initGraphics3d from engine API.
Enabled system API for begin/end gfx transactions, initSize, setGraphicsMode.
Function setGraphicsMode will use optional params to trigger 3d rendering
and switch to proper SDL Gfx manager.
2020-10-02 19:14:19 +02:00
Pawel Kolodziejski e072e2cef8 GRAPHICS: Alpha mode state was not stored in YUVToRGBManager 2020-10-02 13:09:30 +02:00