Commit Graph
41 Commits
Author SHA1 Message Date
Paweł Kołodziejski 0ca414daa0 TINYGL: Removed few more forced inlines 2022-07-17 01:35:19 +02:00
Paweł Kołodziejski d832c015ad TINYGL: Fixed missing semicolon 2022-06-27 22:45:59 +02:00
neuromancer ca89768161 TINYGL: avoid zero division when drawing lines (#4064)
TINYGL: avoid zero division when drawing lines
2022-06-27 22:21:54 +02:00
Paweł Kołodziejski de67c1ae54 TINYGL: Latest TinyGL 0.4.1 is relicensed under MIT license. 2022-03-08 15:47:20 +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 b673e0adf5 TINYGL: Janitorial 2021-12-15 23:55:36 +01:00
Paweł Kołodziejski 87594a052f TINYGL: Cleanup more FrameBuffer class entries 2021-12-07 22:11:55 +01:00
Paweł Kołodziejski eab1fe4097 TINYGL: Implemented tglPolygonOffset function 2021-10-26 21:59:04 +02:00
Orgad Shaneh a05e54f00c JANITORIAL: Remove trailing whitespaces 2021-05-04 11:46:30 +03:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Vincent Pelletier 054a2bd920 TINYGL: Fix line color
As in ztriangle, vertex color must be shifted from internal 16-bits
fixed-point format to 8-bits colors.
To do so, define values similar to the ones describing for ST fixed-point
format.
Also, use these in tglClear instead of hard-coded multiplicands, as is
done in tglColor4f and gl_transform_to_viewport.
Also, make tglClear take into account requested clear depth.
2017-05-01 02:21:40 +00:00
Vincent Pelletier db764b1ca5 TINYGL: Entirely avoid calling scissorPixel in putPixel when possible. 2016-07-21 16:02:22 +02:00
Vincent Pelletier 3c2689a65f TINYGL: Optimise scissorPixel.
Scissor operations happen in a 2d rectangle, but it used to take a buffer
offset as a parameter. As a result, it had to divide that value with its
width, which is an expensive operation, which has to be done for each
pixel candidate for display (even before z-buffer comparison when
applicable, in current implementatoin).
But callers actually generate the buffer offset from rectangular
coordinates, so propagate these instead.
This sadly increases API redundancy, but saves a lot of time in a very
frequent occurrence (especially when enabling dirty rect mechanism,
which is not yet enabled by default).
2016-07-21 15:56:29 +02:00
Vincent Pelletier 638b841c74 TINYGL: Simplify zline.cpp .
drawLine was broken for dx = 0 lines.
Also, the split between fillLineGeneric and drawLine, along with the many
parameters exchanged (with obscure names with subtle differences), made
the code hard to understand.
This implementation should be easier to check.
There was no visible CPU usage change.
Fixes GRIM's ticket printer, which are composed of a lot of vertical
segments.
2016-07-18 15:55:08 +02:00
Vincent Pelletier 03da50312b TINYGL: Move the task of writing to z-buffer to FrameBuffer::writePixel.
Because writePixel may decide to not write anything (alpha test), in which
case no z-buffer write should happen.
Factorises code.
Fixes apparent back-face culling in GRIM behind transparent textures, like
the tube (the 3d-shape Manny takes out, not the flat image in foreground)
in set mo.
2016-07-14 21:30:18 +00:00
Stefano Musumeci 2cf70d6d76 Merge branch 'master' into tinygl-dirty-rects-fixed
Conflicts:
	graphics/tinygl/ztriangle.cpp
2014-08-16 16:03:27 +02:00
Joni Vähämäki 5bdfbb29eb TINYGL: Do not write to the depth buffer if depth test is disabled. 2014-08-14 22:01:18 +03:00
Pawel Kolodziejski 1b48414d7e TINYGL: cleanup license headers 2014-08-13 18:52:52 +02:00
Stefano Musumeci 6e75f6b594 TINYGL: Renamed rasterization functions template parameters with constants naming convention. 2014-08-10 20:31:07 +02:00
Stefano Musumeci f107e7cf6b TINYGL: Renamed variables to camelCase. 2014-08-09 12:00:43 +02:00
Stefano Musumeci 0d78b652bd TINYGL: Implemented pixel scissoring in line rasterization. 2014-08-05 13:22:46 +02:00
Pawel Kolodziejski 9a81f8997c TINYGL: properly handle color for FLAT mode and lines drawing. Respect FLAT/SMOOTH mode for triangle drawing 2014-07-05 20:54:14 +02:00
Pawel Kolodziejski 1b8dd28bc7 TINYGL: implemented tglDepthFunc 2014-07-04 23:14:44 +02:00
Stefano Musumeci 38aa730b76 TINYGL: Implemented tglDepthMask. 2014-07-03 17:02:01 +02:00
Pawel Kolodziejski d61fdc9bf6 TINYGL: fixed previous formatting 2014-07-02 18:45:30 +02:00
Pawel Kolodziejski e350350908 TINYGL: formatting code 2014-07-02 07:59:22 +02:00
Stefano Musumeci 109767e513 TINYGL: Implemented alpha blending and color transformation in sprite blitting for Grim TinyGL renderer. 2014-07-02 00:09:13 +02:00
Stefano Musumeci 63fd685589 TINYGL: Implemented alpha interpolation in triangle rasterization routine. 2014-07-01 14:29:44 +02:00
Stefano Musumeci 03072c4b7b TINYGL: Encapsulated pixel access in FrameBuffer class, provided an implementation of glBlendFunc. 2014-07-01 14:27:40 +02:00
Pawel Kolodziejski f33e1384f1 TINYGL: fixed formatting and minor cleanup 2014-06-30 02:40:46 +02:00
Stefano Musumeci e373f12d64 TINYGL: Removed unnecessary files and updated changelog. 2014-06-29 19:13:18 +02:00
Stefano Musumeci 4555f10cd8 TINYGL: Refactored line drawing routines. 2014-06-29 19:13:18 +02:00
Stefano Musumeci b9e0b28ed9 TINYGL: Renamed ZBuffer into FrameBuffer 2014-06-28 20:39:08 +02:00
Stefano Musumeci 81b5d40588 TINYGL: Refactored fill functions inside ZBuffer struct. 2014-06-28 20:39:07 +02:00
Einar Johan Trøan Sømåen 698ef4a37c TINYGL: Use astyle to (semi-selectively) apply the code-formatting conventions to TinyGL. 2014-02-20 18:46:49 +01:00
Giulio Camuffo 8156e3a9a3 TinyGL: Remove the double zbuffer. Just use the 32bit one. 2012-02-13 19:21:37 +01:00
Giulio Camuffo b42bbe5259 TinyGL: Support for different color modes, part 2. 2012-01-24 21:36:47 +01:00
Pawel Kolodziejski 49b578ec6a put tinygl internals into namespace, left only api 2009-05-25 13:19:29 +00:00
Pawel Kolodziejski 110527019b make compilable after latest change 2009-05-08 07:32:33 +00:00
Pawel Kolodziejski f85c21fa4c moved tinygl 2009-05-08 07:17:43 +00:00